Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into cesium-ion
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 8, 2024
2 parents 797c982 + a40b0ef commit 0aec23d
Show file tree
Hide file tree
Showing 188 changed files with 4,803 additions and 2,481 deletions.
33 changes: 32 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
# Change Log

#### next release (8.7.5)
#### next release (8.7.7)

- [The next improvement]

#### 8.7.6 - 2024-08-22

- Add I3SCatalogItem
- getFeaturesFromPickResult now async to handle I3SNode.loadFields()
- extract common style logic to new Cesium3dTilesStyleMixin.ts
- Set default value for date and datetime WPS fields only when the field is marked as required.
- Fix Sass deprecation warnings (declarations after nested blocks)
- Fix legend shown for WMS difference output item
- Add `diffItemProperties` trait to override properties of WSM difference output item. Useful for customizing feature info template strings etc.
- Add Proj4 definition for EPSG:8059
- Upgrade to terriajs-cesium 8.0.1.
- Re-enable terrain splitting.
- Add support for ArcGis ImageServer - this includes
- Support for "dynamic" `exportImage` endpoint (using `102100` wkid)
- Support for web mercator and wgs84 precached tiles
- Basic support for raster functions - a dropdown is rendered in the workbench for custom raster functions
- Traits to configure `bandIds` and `renderingRule`
- Increase `maxRefreshIntervals` from 1000 to 10000 for `WebMapServiceCatalogItem` and `ArcGisMapServerCatalogItem`.
- Add `nextDiscreteJulianDate` helper computed value to `DiscretelyTimeVaryingMixin`
- Add `EPSG:7899` to `Proj4Definitions`
- [The next improvement]

#### 8.7.5 - 2024-06-26

- TSify some `js` and `jsx` files and provide `.d.ts` ambient type files for a few others. This is so that running `tsc` on an external project that imports Terria code will typecheck successfully.
- Upgraded a bunch of d3 dependencies for fixing security errors.
- Show rectangle selector for WPS bounding box parameter
- Fix `store` and `status` values send in WPS Execute request.
- Add docs for `modelDimensions`

#### 8.7.4 - 2024-06-07

- Fix position of draggable point after moving.
Expand All @@ -23,6 +53,7 @@

#### 8.7.2 - 2024-05-14

- Add NumberParameterEditor to enable WPS AllowedValues Ranges to be set and use DefaultValue
- Feature info template has access to activeStyle of item having TableTraits.
- Updated a few dependencies to fix security warnings: `underscore`, `visx`, `shpjs`, `resolve-uri-loader`, `svg-sprite-loader`
- Allow related maps UI strings to be translated. Translation support for related maps content is not included.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ See [Getting Started](https://docs.terria.io/guide/getting-started/) in the [Doc

#### Related components

- **[TerriaMapStatic](https://github.com/terriajs/terriamapstatic)**, a pre-built version of TerriaMap, which can be deployed as a static HTML website, such as on Github Pages.
- **[TerriaMapStatic](https://github.com/terriajs/terriamap-static)**, a pre-built version of TerriaMap, which can be deployed as a static HTML website, such as on Github Pages.

### Big Thanks

Expand Down
9 changes: 9 additions & 0 deletions buildprocess/configureWebpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function configureWebpack(
".webpack.js",
".web.js",
".js",
".mjs",
".ts",
".tsx"
];
Expand Down Expand Up @@ -111,6 +112,14 @@ function configureWebpack(
})
});

// Some packages exports an .mjs file for ESM imports.
// This rule instructs webpack to import mjs modules correctly.
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
});

const zipJsDir = path.dirname(require.resolve("@zip.js/zip.js/package.json"));

config.module.rules.push({
Expand Down
67 changes: 0 additions & 67 deletions buildprocess/directory-loader.js

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions doc/connecting-to-data/customizing-data-appearance/model-dimensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Model Dimensions

Model dimensions can be used to define dropdown menus in the workbench that update model JSON - think of it as a dropdown that patches the model JSON with a new value. This is useful for changing the appearance of a dataset, such as changing the colourMap for a CSV.

## Basic example

For example - this renders a new drop down called "Color" that changes the `colorPalette` trait - [test link](http://ci.terria.io/main/#clean&start={%22initSources%22%3A[{%22homeCamera%22%3A{%22north%22%3A-8%2C%22east%22%3A158%2C%22south%22%3A-45%2C%22west%22%3A109}%2C%22workbench%22%3A[%22test%22]%2C%22catalog%22%3A[{%22type%22%3A%22csv%22%2C%22url%22%3A%22test%2FNSW_LGA_NEXIS_201212.csv%22%2C%22name%22%3A%22NSWLGANEXIS2012%22%2C%22id%22%3A%22test%22%2C%22modelDimensions%22%3A[{%22id%22%3A%22cols%22%2C%22name%22%3A%22Color%22%2C%22selectedId%22%3A%22Red%22%2C%22options%22%3A[{%22id%22%3A%22Red%22%2C%22value%22%3A{%22defaultStyle%22%3A{%22color%22%3A{%22colorPalette%22%3A%22Reds%22}}}}%2C{%22id%22%3A%22Blue%22%2C%22value%22%3A{%22defaultStyle%22%3A{%22color%22%3A{%22colorPalette%22%3A%22Blues%22}}}}]}]}]}]})

```json
{
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
{
"id": "cols",
"name": "Color",
"selectedId": "Red",
"options": [
{
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Reds"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "Blues"
}
}
}
}
]
}
]
}
```

<img src="../img/model-dim.jpeg">

## Example with Mustache template

Model dimensions also supports the use of [Mustache templates](https://mustache.github.io/) - this means you can refer to other parts of the model JSON in the value of the model dimension. For example, this changes the `colorPalette` trait:

```json
{
"type": "csv",
"url": "test/NSW_LGA_NEXIS_201212.csv",
"name": "NSW LGA NEXIS 2012",
"modelDimensions": [
{
"id": "Cols",
"selectedId": "Red",
"options": [
{
"id": "Red",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
},
{
"id": "Blue",
"value": {
"defaultStyle": {
"color": {
"colorPalette": "{{modelDimensions.0.selectedId}}"
}
}
}
}
]
}
]
}
```

This is a silly example - but the template approach means you can have "interaction" between `modelDimensions`

```json
{
...,
"modelDimensions": [
{
"id": "some-dim",
"selectedId": "some-option",
"options": [
{
"id": "some-option",
"value": {
"url": "https://example.com/{{modelDimensions.0.selectedId}}-and-{{modelDimensions.1.selectedId}}.geojson"
}
},
...
]
}
],
...
}
```

## Default `selectedId`

It is important to note that the `selectedId` does not apply/update the model JSON when the model is first loaded. So it is best to make sure that the `selectedId` matches your default model JSON.
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ This section explains how you can use such a file to improve the look of your da
- [Customizing the Appearance of Tabular Data](./tabular-data.md)
- [Customizing the Appearance of Imagery Data](./imagery-data.md)
- [Customizing the Feature Info Template](./feature-info-template.md)
- [Using Model Dimensions to customise the Workbench](./model-dimensions.md)
1 change: 1 addition & 0 deletions doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ nav:
- Imagery Data: connecting-to-data/customizing-data-appearance/imagery-data.md
- Tabular Data: connecting-to-data/customizing-data-appearance/tabular-data.md
- Feature Information Template: connecting-to-data/customizing-data-appearance/feature-info-template.md
- Model Dimensions: connecting-to-data/customizing-data-appearance/model-dimensions.md
- Catalog Functions: connecting-to-data/catalog-functions.md
- Catalog References: connecting-to-data/catalog-references.md
- Catalog Type Details:
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ gulp.task("lint", function (done) {
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"264" // TODO: Bring this back to 0
"238" // TODO: Bring this back to 0
]);

done();
Expand Down
63 changes: 0 additions & 63 deletions lib/Charts/BarChart.js

This file was deleted.

43 changes: 0 additions & 43 deletions lib/Charts/BaseChart.js

This file was deleted.

Loading

0 comments on commit 0aec23d

Please sign in to comment.