Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/essence/Basics/Layers_/Filtering/Filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ const Filtering = {
type: layerObj.type,
needsToQueryGeodataset:
layerObj?.url.startsWith('geodatasets:') &&
layerObj?.variables?.dynamicExtent === true &&
layerObj?.variables?.getFeaturePropertiesOnClick === true,
}

Expand Down Expand Up @@ -762,7 +761,6 @@ const Filtering = {
// needsToQueryGeodataset (but pulled out so submit could be called standalone)
if (
layerObj?.url.startsWith('geodatasets:') &&
layerObj?.variables?.dynamicExtent === true &&
layerObj?.variables?.getFeaturePropertiesOnClick === true
) {
GeodatasetFilterer.filter(
Expand Down
2 changes: 1 addition & 1 deletion src/essence/Basics/Layers_/Filtering/GeodatasetFilterer.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const GeodatasetFilterer = {
}
}
}
L_.Map_.refreshLayer(L_.layers.data[layerName])
L_.Map_.refreshLayer(L_.layers.data[layerName], null, null, true)
},
match: function (feature, filter) {
if (filter.values.length === 0) return true
Expand Down
14 changes: 14 additions & 0 deletions src/essence/Basics/Layers_/LayerCapturer.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,13 @@ export const captureVector = (layerObj, options, cb, dynamicCb) => {
}
}

// filters
if (layerData._filterEncoded?.filters)
body.filters = layerData._filterEncoded.filters
if (layerData._filterEncoded?.spatialFilter)
body.spatialFilter =
layerData._filterEncoded.spatialFilter

const dateNow = new Date().getTime()

_layerRequestLastTimestamp[layerObj.name] = Math.max(
Expand Down Expand Up @@ -404,6 +411,13 @@ export const captureVector = (layerObj, options, cb, dynamicCb) => {
.concat(L_.getDynamicProps(layerData))
.filter(Boolean)
: null

// filters
if (layerData._filterEncoded?.filters)
body.filters = layerData._filterEncoded.filters
if (layerData._filterEncoded?.spatialFilter)
body.spatialFilter = layerData._filterEncoded.spatialFilter

layerData._lastGeodatasetRequestBody = body
calls.api(
'geodatasets_get',
Expand Down
9 changes: 7 additions & 2 deletions src/essence/Basics/Map_/Map_.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,12 @@ let Map_ = {
}
})
},
refreshLayer: async function (layerObj, cb, skipOrderedBringToFront) {
refreshLayer: async function (
layerObj,
cb,
skipOrderedBringToFront,
stopLoops
) {
// If it's a dynamic extent layer, just re-call its function
if (
L_._onSpecificLayerToggleSubscriptions[
Expand Down Expand Up @@ -495,7 +500,7 @@ let Map_ = {

// fake on
L_.layers.on[layerObj.name] = true
await makeLayer(layerObj, true, null)
await makeLayer(layerObj, true, null, null, null, stopLoops)
L_.addVisible(Map_, [layerObj.name])

// turn off if was off
Expand Down
6 changes: 3 additions & 3 deletions src/essence/Tools/Layers/LayersTool.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
flex-flow: column;
font-size: 14px;
color: var(--color-f);
overflow: hidden;
}
#layersToolList > li.forceOff {
height: 0 !important;
Expand Down Expand Up @@ -365,7 +364,8 @@
text-transform: capitalize;
mix-blend-mode: difference;
}
#layersTool .tileCogColormap img, #layersTool .tileCogColormap #titlerCogColormapCSS {
#layersTool .tileCogColormap img,
#layersTool .tileCogColormap #titlerCogColormapCSS {
width: 254px;
height: 28px;
transform: rotateZ(90deg) translateX(125px) translateY(-177px);
Expand All @@ -376,7 +376,7 @@
display: flex;
mix-blend-mode: normal;
}
#layersTool .tileCogColormap #titlerCogColormapCSS + #tileCogColormapMapLines {
#layersTool .tileCogColormap #titlerCogColormapCSS + #tileCogColormapMapLines {
margin-top: -2px;
}
#layersTool #layersToolList > li.download_on,
Expand Down