Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into item-props
Browse files Browse the repository at this point in the history
  • Loading branch information
nf-s committed Mar 31, 2022
2 parents 709233b + a52d6d0 commit c3f2329
Show file tree
Hide file tree
Showing 67 changed files with 917 additions and 523 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Change Log
* Added experimental routing system - there may be breaking changes to this system in subsequent patch releases for a short time. The routes currently include:
* `/story/:share-id` ➡ loads share JSON from a URL `${configParameters.storyRouteUrlPrefix}:share-id` (`configParameters.storyRouteUrlPrefix` must have a trailing slash)
* `/catalog/:id` ➡ opens the data catalogue to the specified member
* Fixed a polyline position update bug in `LeafletVisualizer`. Polylines with time varying position will now correctly animate in leaflet mode.
* Change button cursor to pointer
* Add `GeoJsonTraits.filterByProperties` - this can be used to filter GeoJSON features by properties
* Add GeoJSON `czmlTemplate` support for `Polygon/MultiPolygon`
* Add custom `heightOffset` property to `czmlTemplate`
Expand All @@ -20,6 +22,16 @@ Change Log
* Add `itemProperties`, `itemPropertiesByType` and `itemPropertiesById` to `GroupTraits` and `ReferenceTraits`.
* Properties set `underride` strata
* All dynamic groups (eg `WebMapServiceCatalogGroup`) will create members and set `definition` strata (instead of `underride`)
* Fix `viewCatalogMember` bug - where `_previewItem` was being set too late.
* Improve error message in `DataPreview` for references.
* Fix alignment of elements in story panel and move some styling from scss to styled components
* Click on the stories button opens a story builder (button on the left from story number)
* Added ASGS 2021 regions to region mapping:
* SA1-4 (e.g. sa3_code_2021)
* GCCSA
* STE & AUS (aliased to existing 2011/2016 data due to no change in geometry, names & codes)
* Added LGA regions from 2019 & 2021 to region mapping - only usable by lga code
* Add `UrlTempalteImageryCatalogItem`, rename `RasterLayerTraits` to `ImageryProviderTraits` and add some properties.
* [The next improvement]

#### 8.1.25 - 2022-03-16
Expand Down
8 changes: 4 additions & 4 deletions doc/deploying/controlling-in-an-iframe-or-popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Then, the parent window can send messages like this:
</head>

<body>
<iframe id="embeddedNationalMap" src="http://nationalmap.gov.au" width="1024" height="768"></iframe>
<iframe id="embeddedNationalMap" src="https://nationalmap.gov.au" width="1024" height="768"></iframe>

<script type="text/javascript">
window.addEventListener('message', function(e) {
Expand All @@ -35,7 +35,7 @@ Then, the parent window can send messages like this:
"south": -33.907,
"west": 151.165
},
workbench: ["my-data"]
workbench: ["my-data"],
catalog: [
{
type: "group",
Expand All @@ -45,14 +45,14 @@ Then, the parent window can send messages like this:
type: "csv",
name: "My Data",
id: "my-data",
data: "POA,Some Value\n2000,1\n2205,2"
csvString: "POA,Some Value\n2000,1\n2205,2"
}
]
}
]
}
]
}, 'http://nationalmap.gov.au');
}, 'https://nationalmap.gov.au');
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion lib/Language/ca/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@
"unsupportedTypeTitle": "Tipus desconegut",
"unsupportedTypeMessage": "No s'ha pogut crear el tipus {{type}} de model desconegut.",
"unsupportedFileTypeTitle": "Tipus d'arxiu no compatible",
"unsupportedFileTypeMessage": "Aquest format d'arxiu no és compatible amb {{appName}}. Els formats d'arxiu admesos inclouen: <ul><li>.geojson</li><li>.kml, .kmz</li><li>.csv (en {{link}})</li></ul>",
"unsupportedFileTypeMessage": "Aquest format de fitxer no és compatible amb {{appName}}. Els formats de fitxer admesos inclouen: <ul><li>.geojson</li><li>.kml, .kmz</li><li>.csv (a {{link}})</li><li>Shapefile (.zip)</li></ul>",
"getConfirmationMessage": "Aquest arxiu no és compatible directament amb {{appName}}.\n\nVoleu provar de pujar-lo al servei de conversió {{appName}}? Això pot funcionar per a arxius Esri Shapefile petits i comprimits o arxius MapInfo TAB.",
"readyToUpload": "Estàs preparat per enviar el teu arxiu al servei de conversió {{appName}}?",
"upload": "Pujar",
Expand Down
2 changes: 1 addition & 1 deletion lib/Language/cs/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@
"catalogMemberMustHaveType": "Člen katalogu musí mít typ.",
"serviceErrorMessage": "U této služby nejsou k dispozici žádné podrobnosti.",
"unsupportedFileTypeMessageII": "Tento formát souboru aplikace {{appName}} nepodporuje. Mezi přímo podporované formáty souborů patří: <ul><li>.geojson</li><li>.kml, .kmz</li><li>.csv (v {{link}})</li></ul > Formáty souborů podporované prostřednictvím služby online převodu zahrnují: <ul><li>Shapefile (.zip)</li><li>MapInfo TAB (.zip)</li><li>Případně další {{linkII}}</li></ul>",
"unsupportedFileTypeMessage": "Tento formát souboru aplikace {{appName}} nepodporuje. Mezi podporované formáty souborů patří: <ul><li>.geojson</li><li>.kml, .kmz</li><li>.csv (v {{link}})</li></ul>",
"unsupportedFileTypeMessage": "Tento formát souboru aplikace {{appName}} nepodporuje. Mezi podporované formáty souborů patří: <ul><li>.geojson</li><li>.kml, .kmz</li><li>.csv (v {{link}})</li><li>Shapefile (.zip)</li></ul>",
"compositesError": "Kompozity nemohou obsahovat složené položky.",
"mustHaveType": "Každá položka musí mít typ.",
"convertErrorMessage": "Tento katalogový soubor je založen na starší verzi softwaru TerriaJS, který pohání tuto webovou mapu. Při pokusu o aktualizaci katalogových dat pro {{url}} došlo k chybě."
Expand Down
45 changes: 15 additions & 30 deletions lib/Language/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"cancel": "Cancel",
"confirm": "Confirm"
},
"browsers": {
"chrome": "Google Chrome",
"firefox": "Mozilla Firefox",
"edge": "Microsoft Edge",
"safari": "Apple Safari"
},
"trainer": {
"expandTrainer": "Show more step detail",
"collapseTrainer": "Hide step detail",
Expand All @@ -23,9 +29,7 @@
"close": "Maybe later",
"start": "Start tour"
},
"end": "End tour",
"finish": "Finish",
"previous": "Previous",
"locationSearchInput": {
"content": "## Location search\n\nEnter a locality or address to easily locate a point of interest on the map."
},
Expand Down Expand Up @@ -177,8 +181,7 @@
"back": "Go back",
"previousDateTitle": "Previous date",
"nextDateTitle": "Next date",
"dateButtonTitle": "Select a date",
"dateOutOfRange": "Currently out of range"
"dateButtonTitle": "Select a date"
}
},
"legend": {
Expand All @@ -200,10 +203,8 @@
"generatingUrl": "Generating share URL...",
"printTitle": "Print Map",
"printExplanation": "Open a printable version of this map.",
"printButton": "Print",
"downloadMap": "Download map (png)",
"printViewButton": "Show Print View",
"creatingPrintView": "Creating print view...",
"btnAdvanced": "Advanced options",
"embedTitle": "To embed, copy this code to embed this map into an HTML page:",
"shortenUsingService": "Shorten the share URL using a web service",
Expand Down Expand Up @@ -239,7 +240,6 @@
"btnTitle": "Advanced toolbox"
},
"settingPanel": {
"none": "(None)",
"viewerModeLabels": {
"CesiumTerrain": "3D Terrain",
"CesiumEllipsoid": "3D Smooth",
Expand Down Expand Up @@ -286,7 +286,6 @@
"email": "Email address (optional)<br/><em>We can't follow up without it!</em>",
"commentQuestion": "Comment or question",
"shareWithDevelopers": "Share my map view with {{appName}} developers",
"captionText": "This helps us to troubleshoot issues by letting us see what you're seeing",
"cancel": "Cancel",
"sending": "Sending...",
"send": "Send",
Expand All @@ -299,8 +298,7 @@
"menuPaneBody": "Find useful tips on how to use TerriaJS by either checking the guides below or by contacting the team at [{{supportEmail}}]({{supportEmail}})",
"promptMessage": "Find the Tour, how-to videos & other help content here",
"dismissText": "Got it, thanks!",
"takeTour": "Take the tour",
"mapUserGuide": "Map user guide"
"takeTour": "Take the tour"
},
"helpMenu": {
"btnText": "Help",
Expand Down Expand Up @@ -361,7 +359,6 @@
"gettingStartedTitle": "Getting started",
"badgeBarLabel": "Scenes",
"share": "Share",
"shareTitle": "share stories",
"viewStory": "view",
"view": "View",
"editStory": "edit",
Expand All @@ -374,7 +371,6 @@
"delete": "Delete",
"untitledScene": "untitled scene",
"doesNotExist": "Story does not exist",
"message": "<2>This is your story editor</2><1>Create and share interactive stories directly from your map<1><0><0></0>Getting Started </0></1></1>",
"removeAllStories": "Remove All",
"removeAllStoriesDialog": "Are you sure you wish to delete {{ count }} scene?",
"removeAllStoriesDialog_plural": "Are you sure you wish to delete {{ count }} scenes?",
Expand Down Expand Up @@ -509,7 +505,7 @@
"dataUrl": "Data Links",
"useLinkBelow": "Use the link below to download the data. See the {{link}} for more information on customising URL query parameters.",
"downloadInFormat": "Download the currently selected data in {{format}} format",
"downloadNotSupported": "Unfortunately your browser does not support the functionality needed to download this data as a file. Please use Chrome, Firefox or Safari to download this data.",
"downloadNotSupported": "Unfortunately your browser does not support the functionality needed to download this data as a file. Please use $t(browsers.chrome), $t(browsers.firefox), $t(browsers.edge), or $t(browsers.safari) to download this data.",
"useTheLinkToDownload": "Use the link below to download the data directly.",
"downloadData": "Download Data",
"dataSourceDetails": "Data Source Details",
Expand Down Expand Up @@ -657,14 +653,10 @@
"terriaViewer": {
"slowWebGLAvailableTitle": "Poor WebGL performance",
"slowWebGLAvailableMessage": "Your web browser reports that it has performance issues displaying {{appName}} in 3D, so you will see a limited, 2D-only experience. For the full 3D experience, please try using a different web browser, upgrading your video drivers, or upgrading your operating system.",
"slowWebGLAvailableMessageII": "{{appName}} works best with a web browser that supports {{webGL}} including the latest versions of {{chrome}}, {{firefox}}, {{safari}} , and {{internetExplorer}}. Your web browser does not appear to support WebGL, so you will see a limited, 2D-only experience.",
"internetExplorer": "Internet Explorer 11",
"chrome": "Google Chrome",
"firefox": "Mozilla Firefox",
"safari": "Apple Safari",
"slowWebGLAvailableMessageII": "{{appName}} works best with a web browser that supports {{webGL}} including the latest versions of $t(browsers.chrome), $t(browsers.firefox), $t(browsers.edge), and $t(browsers.safari). Your web browser does not appear to support WebGL, so you will see a limited, 2D-only experience.",
"webGLNotSupportedTitle": "WebGL not supported",
"webGLNotSupportedOrSlowTitle": "WebGL not supported or too slow",
"webGLNotSupportedOrSlowMessage": "Your web browser cannot display the map in 3D, either because it does not support WebGL or because your web browser has reported that WebGL will be extremely slow. Please try a different web browser, such as the latest version of {{chrome}}, {{firefox}}, {{safari}}, {{internetExplorer}}.In some cases, you may need to upgrade your computer's video driver or operating system in order to get the 3D view in {{appName}}."
"webGLNotSupportedOrSlowMessage": "Your web browser cannot display the map in 3D, either because it does not support WebGL or because your web browser has reported that WebGL will be extremely slow. Please try a different web browser, such as the latest version of $t(browsers.chrome), $t(browsers.firefox), $t(browsers.edge), or $t(browsers.safari). In some cases, you may need to upgrade your computer's video driver or operating system in order to get the 3D view in {{appName}}."
},
"analytics": {
"selectLocation": "Select Location",
Expand All @@ -691,7 +683,7 @@
"chartData": "Chart Data",
"dataUri": {
"errorTitle": "Browser Does Not Support Data Download",
"errorMessage": "Unfortunately Microsoft browsers (including all versions of Internet Explorer and Edge) do not support the data uri functionality needed to download data as a file. To download, copy the following uri into another browser such as Chrome, Firefox or Safari: {{href}}"
"errorMessage": "Unfortunately Microsoft browsers (including all versions of Internet Explorer and Edge) do not support the data uri functionality needed to download data as a file. To download, copy the following uri into another browser such as $t(browsers.chrome), $t(browsers.firefox), or $t(browsers.safari): {{href}}"
},
"dataType": {
"auto": "Auto-detect (recommended)",
Expand Down Expand Up @@ -825,11 +817,7 @@
"addingDataErrorTitle": "Data could not be added",
"addingDataErrorMessage": "The specified data could not be added because it is invalid or does not have the expected format.",
"fileApiNotSupportedTitle": "File API not supported",
"fileApiNotSupportedMessage": "Sorry, your web browser does not support the File API, which {{appName}} requires in order to add data from a file on your system. Please upgrade your web browser. For the best experience, we recommend the latest version of {{chrome}}, {{firefox}} or {{edge}}.",
"internetExplorer": "Internet Explorer 11",
"edge": "Microsoft Edge",
"chrome": "Google Chrome",
"firefox": "Mozilla Firefox"
"fileApiNotSupportedMessage": "Sorry, your web browser does not support the File API, which {{appName}} requires in order to add data from a file on your system. Please upgrade your web browser. For the best experience, we recommend the latest version of {{chrome}}, {{firefox}} or {{edge}}."
},
"arcGisService": {
"name": "ArcGIS Service Group",
Expand Down Expand Up @@ -1036,10 +1024,7 @@
"unableToLoadItemTitle": "No GeoJSON available",
"unableToLoadItemMessage": "The GeoJSON catalog item cannot be loaded because it was not configured with a `url`, `geoJsonData`, or `geoJsonString` property.",
"unsupportedBrowserTitle": "Unsupported web browser",
"unsupportedBrowserMessage": "Sorry, your web browser does not support the File API, which {{appName}} requires in order to load this dataset. Please upgrade your web browser. For the best experience, we recommend the latest versions of {{chrome}} or {{firefox}} or {{internetExplorer}}.",
"internetExplorer": "Internet Explorer 11",
"chrome": "Google Chrome",
"firefox": "Mozilla Firefox"
"unsupportedBrowserMessage": "Sorry, your web browser does not support the File API, which {{appName}} requires in order to load this dataset. Please upgrade your web browser. For the best experience, we recommend the latest versions of $t(browsers.chrome) or $t(browsers.firefox) or $t(browsers.edge) or $t(browsers.safari)."
},
"shapefile": {
"name": "Shapefile"
Expand Down Expand Up @@ -1178,7 +1163,7 @@
"noDataForDate": "No data for the selected date.",
"noDataForRegion": "No data for the selected region.",
"outdatedBrowserTitle": "Outdated Web Browser",
"outdatedBrowserMessage": "You are using a very old web browser that cannot display \"region mapped\" datasets such as this one. Please upgrade to the latest version of Google Chrome, Mozilla Firefox, Microsoft Edge, Microsoft Internet Explorer 11, or Apple Safari as soon as possible.",
"outdatedBrowserMessage": "You are using a very old web browser that cannot display \"region mapped\" datasets such as this one. Please upgrade to the latest version of $t(browsers.chrome), $t(browsers.firefox), $t(browsers.edge), or $t(browsers.safari) as soon as possible.",
"invalidServerTypeTitle": "Invalid serverType {{serverType}} in regionMapping.json",
"invalidServerTypeMessage": "Expected serverType to be \"WMS\" or \"vector\" but got \"{{serverType}}\"",
"notRecognised": "These region names were {{notRecognisedText}} ",
Expand Down
13 changes: 13 additions & 0 deletions lib/Language/tr/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"general": {
"next": "Sonra",
"skip": "Geç",
"back": "Geri",
"delete": "Sil",
"cancel": "İptal",
"confirm": "Onayla",
"close": "Kapat",
"open": "",
"prev": "Önce"
}
}
2 changes: 1 addition & 1 deletion lib/Map/LeafletVisualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ class LeafletGeomVisualizer {
let bPosChange = latlngs.length !== curLatLngs.length;
for (let i = 0; i < curLatLngs.length && !bPosChange; i++) {
const latlng = curLatLngs[i];
if (latlng instanceof L.LatLng && latlng.equals(latlngs[i])) {
if (latlng instanceof L.LatLng && !latlng.equals(latlngs[i])) {
bPosChange = true;
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/ModelMixins/MappableMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type MapItem =
| Cesium3DTileset
| TerrainProvider;

// Shouldn't this be a class?
export interface ImageryParts {
alpha: number;
clippingRectangle: Rectangle | undefined;
Expand Down
48 changes: 23 additions & 25 deletions lib/ModelMixins/ReferenceMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,30 @@ function ReferenceMixin<T extends Constructor<Model<ReferenceTraits>>>(
@observable
private _target: BaseModel | undefined;

private _referenceLoader = new AsyncLoader(() => {
private _referenceLoader = new AsyncLoader(async () => {
const previousTarget = untracked(() => this._target);
return this.forceLoadReference(previousTarget).then(target => {
if (!target) {
throw new DeveloperError("Failed to create reference");
}

if (target?.uniqueId !== this.uniqueId) {
throw new DeveloperError(
"The model returned by `forceLoadReference` must be constructed with its `uniqueId` set to the same value as the Reference model."
);
}
if (!this.weakReference && target?.sourceReference !== this) {
throw new DeveloperError(
"The model returned by `forceLoadReference` must be constructed with its `sourceReference` set to the Reference model."
);
}

if (this.weakReference && target?.sourceReference) {
throw new DeveloperError(
'This is a "weak" reference, so the model returned by `forceLoadReference` must not have a `sourceReference` set.'
);
}
runInAction(() => {
this._target = target;
});
const target = await this.forceLoadReference(previousTarget);

if (!target) {
throw new DeveloperError("Failed to create reference");
}
if (target?.uniqueId !== this.uniqueId) {
throw new DeveloperError(
"The model returned by `forceLoadReference` must be constructed with its `uniqueId` set to the same value as the Reference model."
);
}
if (!this.weakReference && target?.sourceReference !== this) {
throw new DeveloperError(
"The model returned by `forceLoadReference` must be constructed with its `sourceReference` set to the Reference model."
);
}
if (this.weakReference && target?.sourceReference) {
throw new DeveloperError(
'This is a "weak" reference, so the model returned by `forceLoadReference` must not have a `sourceReference` set.'
);
}
runInAction(() => {
this._target = target;
});
});

Expand Down
4 changes: 1 addition & 3 deletions lib/ModelMixins/TableMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ function TableMixin<T extends Constructor<Model<TableTraits>>>(Base: T) {
imageryProvider: this.regionMappedImageryProvider,
alpha: this.opacity,
show: this.show,
clippingRectangle: this.clipToRectangle
? this.cesiumRectangle
: undefined
clippingRectangle: this.cesiumRectangle
};
}

Expand Down
Loading

0 comments on commit c3f2329

Please sign in to comment.