Remove obsolete method
This commit is contained in:
parent
437f1abd4e
commit
1f9cab7134
2 changed files with 1 additions and 17 deletions
|
@ -90,7 +90,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
this.lastClickLocation = lastClickLocation
|
||||
const self = this
|
||||
|
||||
const rasterLayerHandler = new RasterLayerHandler(this._maplibreMap, this.rasterLayer)
|
||||
new RasterLayerHandler(this._maplibreMap, this.rasterLayer)
|
||||
|
||||
function handleClick(e) {
|
||||
if (e.originalEvent["consumed"]) {
|
||||
|
@ -114,7 +114,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
self.setMaxzoom(self.maxzoom.data)
|
||||
self.setBounds(self.bounds.data)
|
||||
self.setTerrain(self.useTerrain.data)
|
||||
rasterLayerHandler.setBackground()
|
||||
this.updateStores(true)
|
||||
})
|
||||
self.MoveMapToCurrentLoc(self.location.data)
|
||||
|
@ -128,7 +127,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
self.setBounds(self.bounds.data)
|
||||
self.SetRotation(self.rotation.data)
|
||||
self.setTerrain(self.useTerrain.data)
|
||||
rasterLayerHandler.setBackground()
|
||||
this.updateStores(true)
|
||||
map.on("moveend", () => this.updateStores())
|
||||
map.on("click", (e) => {
|
||||
|
@ -177,7 +175,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
})
|
||||
})
|
||||
|
||||
this.rasterLayer.addCallbackAndRun((_) => rasterLayerHandler.setBackground())
|
||||
this.location.addCallbackAndRunD((loc) => {
|
||||
self.MoveMapToCurrentLoc(loc)
|
||||
})
|
||||
|
|
|
@ -144,23 +144,15 @@ class SingleBackgroundHandler {
|
|||
}
|
||||
|
||||
export default class RasterLayerHandler {
|
||||
private _map: Store<MLMap>
|
||||
private _background: UIEventSource<RasterLayerPolygon | undefined>
|
||||
private _singleLayerHandlers: Record<string, SingleBackgroundHandler> = {}
|
||||
|
||||
constructor(map: Store<MLMap>, background: UIEventSource<RasterLayerPolygon | undefined>) {
|
||||
this._map = map
|
||||
this._background = background
|
||||
background.addCallbackAndRunD((l) => {
|
||||
const key = l.properties.id
|
||||
if (!this._singleLayerHandlers[key]) {
|
||||
this._singleLayerHandlers[key] = new SingleBackgroundHandler(map, l, background)
|
||||
}
|
||||
})
|
||||
map.addCallback((map) => {
|
||||
map.on("load", () => this.setBackground())
|
||||
this.setBackground()
|
||||
})
|
||||
}
|
||||
|
||||
public static prepareWmsSource(layer: RasterLayerProperties): SourceSpecification {
|
||||
|
@ -203,9 +195,4 @@ export default class RasterLayerHandler {
|
|||
|
||||
return url
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs all necessary updates
|
||||
*/
|
||||
public setBackground() {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue