UX: fix #1805, disable zoom-in and zoom-out buttons when maxrange reached

This commit is contained in:
Pieter Vander Vennet 2024-03-04 15:31:09 +01:00
parent 346f45cff8
commit 48159b25f7
13 changed files with 202 additions and 184 deletions

View file

@ -439,6 +439,19 @@ export default class ThemeViewState implements SpecialVisualizationState {
this.selectedElement.setData(feature)
}
public showCurrentLocationOn(map: Store<MlMap>): ShowDataLayer {
const id = "gps_location"
const flayerGps = this.layerState.filteredLayers.get(id)
const features = this.geolocation.currentUserLocation
return new ShowDataLayer(map, {
features,
doShowLayer: flayerGps.isDisplayed,
layer: flayerGps.layerDef,
metaTags: this.userRelatedState.preferencesAsTags,
selectedElement: this.selectedElement,
})
}
/**
* Various small methods that need to be called
*/
@ -671,6 +684,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
)
return new SummaryTileSourceRewriter(summaryTileSource, this.layerState.filteredLayers)
}
/**
* Add the special layers to the map
*/