Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Oct 3, 2023
2 parents d111182 + 2de964c commit b8d4e77
Show file tree
Hide file tree
Showing 11 changed files with 3,088 additions and 9,609 deletions.
24 changes: 19 additions & 5 deletions config/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ function makeLayerBarAndModal(d, level, options) {
modelLonEl = "none"; modelLatEl = "none"; modelElevEl = "none";
modelRotXEl = "none"; modelRotYEl = "none"; modelRotZEl = "none"; modelScaleEl = "none";
maxnzEl = "block"; maxzEl = "block"; strcolEl = "none"; filcolEl = "none";
weightEl = "none"; opacityEl = "none"; radiusEl = "none"; variableEl = "none";
weightEl = "none"; opacityEl = "none"; radiusEl = "none"; variableEl = "block";
xmlEl = "block"; bbEl = "block"; vtLayerEl = "none"; vtIdEl = "none"; vtKeyEl = "none"; vtLayerSetStylesEl = "none";
timeEl = "block"; timeTypeEl = "block"; timeStartPropEl = "none"; timeEndPropEl = "none"; timeFormatEl = "block"; timeCompositeTileEl = "block"; timeRefreshEl = "none"; timeIncrementEl = "none"; shapeEl = "none";
queryEndpointEl = "none"; queryTypeEl = "none";
Expand Down Expand Up @@ -1070,7 +1070,7 @@ function makeLayerBarAndModal(d, level, options) {
modelLonEl = "block"; modelLatEl = "block"; modelElevEl = "block";
modelRotXEl = "block"; modelRotYEl = "block"; modelRotZEl = "block"; modelScaleEl = "block";
maxnzEl = "none"; maxzEl = "none"; strcolEl = "none"; filcolEl = "none";
weightEl = "none"; opacityEl = "none"; radiusEl = "none"; variableEl = "none";
weightEl = "none"; opacityEl = "none"; radiusEl = "none"; variableEl = "block";
xmlEl = "none"; bbEl = "none"; vtLayerEl = "none"; vtIdEl = "none"; vtKeyEl = "none"; vtLayerSetStylesEl = "none";
timeEl = "block"; timeTypeEl = "block"; timeStartPropEl = "none"; timeEndPropEl = "none"; timeFormatEl = "block"; timeCompositeTileEl = "none"; timeRefreshEl = "none"; timeIncrementEl = "none"; shapeEl = "none";
queryEndpointEl = "none"; queryTypeEl = "none";
Expand Down Expand Up @@ -1811,7 +1811,7 @@ function mmgisLinkModalsToLayersTypeChange(e) {
modelLonEl = "none"; modelLatEl = "none"; modelElevEl = "none";
modelRotXEl = "none"; modelRotYEl = "none"; modelRotZEl = "none"; modelScaleEl = "none";
maxzEl = "block"; strcolEl = "none"; filcolEl = "none"; weightEl = "none";
opacityEl = "none"; radiusEl = "none"; variableEl = "none";
opacityEl = "none"; radiusEl = "none"; variableEl = "block";
xmlEl = "block"; bbEl = "block"; vtLayerEl = "none"; vtIdEl = "none"; vtKeyEl = "none"; vtLayerSetStylesEl = "none";
timeEl = 'block'; timeTypeEl = 'block'; timeStartPropEl = 'none'; timeEndPropEl = 'none'; timeFormatEl = 'block'; timeCompositeTileEl = 'block'; timeRefreshEl = 'none'; timeIncrementEl = 'none';
shapeEl = 'none'; queryEndpointEl = "none"; queryTypeEl = "none";
Expand Down Expand Up @@ -1871,7 +1871,7 @@ function mmgisLinkModalsToLayersTypeChange(e) {
modelLonEl = "block"; modelLatEl = "block"; modelElevEl = "block";
modelRotXEl = "block"; modelRotYEl = "block"; modelRotZEl = "block"; modelScaleEl = "block";
maxzEl = "none"; strcolEl = "none"; filcolEl = "none"; weightEl = "none";
opacityEl = "none"; radiusEl = "none"; variableEl = "none";
opacityEl = "none"; radiusEl = "none"; variableEl = "block";
xmlEl = "none"; bbEl = "none"; vtLayerEl = "none"; vtIdEl = "none"; vtKeyEl = "none"; vtLayerSetStylesEl = "none";
timeEl = 'block'; timeTypeEl = 'block'; timeStartPropEl = 'none'; timeEndPropEl = 'none'; timeFormatEl = 'block'; timeCompositeTileEl = 'none'; timeRefreshEl = 'none'; timeIncrementEl = 'none';
shapeEl = 'none'; queryEndpointEl = "none"; queryTypeEl = "none";
Expand Down Expand Up @@ -2462,6 +2462,17 @@ function save(returnJSON) {
}
}
if (modalType == "tile" || modalType == "data") {
if (modalVariable != "undefined") {
try {
layerObject.variables = JSON.parse(modalVariable);
} catch (e) {
toast(
"warning",
`Skipping badly formed raw variable JSON of '${modalName}'`,
5000
);
}
}
if (modalTileFormat != "undefined")
layerObject.tileformat = modalTileFormat;
}
Expand Down Expand Up @@ -2762,6 +2773,7 @@ function tilelayerPopulateFromXML(modalId) {

function layerPopulateVariable(modalId, layerType) {
modalId = "Variable" + modalId;

if (layerEditors[modalId]) {
var currentLayerVars = JSON.parse(layerEditors[modalId].getValue() || "{}");

Expand All @@ -2773,8 +2785,10 @@ function layerPopulateVariable(modalId, layerType) {
value: "Example",
},
];
currentLayerVars.shortcutSuffix = currentLayerVars.shortcutSuffix || null;

if (layerType == "data") {
if (layerType == "tile") {
} else if (layerType == "data") {
currentLayerVars = currentLayerVars.shader
? { shader: currentLayerVars.shader }
: {
Expand Down
14 changes: 14 additions & 0 deletions docs/pages/Configure/Layers/Tile/Tile.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,17 @@ The string format to be used in the URL for `{time}`. Defaults to `%Y-%m-%dT%H:%
_type:_ boolean

When using MMGIS-served time tiles (time enabled, `{t}` in the url, tiles served under /Missions in the format described in Time_Tiles), whether to composite/merge each tile with with the other tiles are the same location across the time query. This is useful when Time Tile data is sparse. It is a more expensive operation. If your Time Tiles are complete (no alpha in a tile), leave this False as merging tiles historically would have no effect.

#### Raw Variables

Clicking "Set Default Variables" will add a template of all possible raw variables (without overwriting ones that are already set). All raw variables are optional.

Example:

```javascript
{
"shortcutSuffix": "single letter to 'ATL + {letter}' toggle the layer on and off"
}
```

- `shortcutSuffix`: A single letter to 'ALT + {letter}' toggle the layer on and off. Please verify that your chosen shortcut does not conflict with other system or browser-level keyboard shortcuts.
2 changes: 2 additions & 0 deletions docs/pages/Configure/Layers/Vector/Vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Example:
```javascript
{
"useKeyAsName": "propKey || [propKey1, propKey2, ...]",
"shortcutSuffix": "single letter to 'ATL + {letter}' toggle the layer on and off",
"hideMainFeature": false,
"datasetLinks": [
{
Expand Down Expand Up @@ -252,6 +253,7 @@ Example:
```

- `useKeyAsName`: The property key whose value should be the hover text of each feature. If left unset, the hover key and value will be the first one listed in the feature's properties. This may also be an array of keys.
- `shortcutSuffix`: A single letter to 'ALT + {letter}' toggle the layer on and off. Please verify that your chosen shortcut does not conflict with other system or browser-level keyboard shortcuts.
- `hideMainFeature`: If true, hides all typically rendered features. This is useful if showing only `*Attachments` sublayers is desired. Default false
- `datasetLinks`: Datasets are csvs uploaded from the "Manage Datasets" page accessible on the lower left. Every time a feature from this layer is clicked with datasetLinks configured, it will request the data from the server and include it with it's regular geojson properties. This is especially useful when single features need a lot of metadata to perform a task as it loads it only as needed.
- `prop`: This is a property key already within the features properties. It's value will be searched for in the specified dataset column.
Expand Down
Loading

0 comments on commit b8d4e77

Please sign in to comment.