forked from MapComplete/MapComplete
Fix: probably fix black area outlines
This commit is contained in:
parent
6e5fcdef20
commit
0bd9e1e667
3 changed files with 9 additions and 8 deletions
|
@ -417,6 +417,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
if (!map.getLayer(addLayerBeforeId)) {
|
||||
addLayerBeforeId = undefined
|
||||
}
|
||||
await this.awaitStyleIsLoaded()
|
||||
if (!map.getSource(background.id)) {
|
||||
map.addSource(background.id, MapLibreAdaptor.prepareWmsSource(background))
|
||||
}
|
||||
|
|
|
@ -230,8 +230,6 @@ class LineRenderingLayer {
|
|||
features.features.addCallbackAndRunD(() => self.update(features.features))
|
||||
|
||||
map.on("styledata", () => self.update(features.features))
|
||||
// map.on("style.load", () => self.update(features.features))
|
||||
|
||||
}
|
||||
|
||||
public destruct(): void {
|
||||
|
@ -353,7 +351,6 @@ class LineRenderingLayer {
|
|||
return;
|
||||
}
|
||||
e.originalEvent["consumed"] = true;
|
||||
console.log("Got features:", e.features, e);
|
||||
this._onClick(e.features[0]);
|
||||
});
|
||||
}
|
||||
|
@ -397,9 +394,6 @@ class LineRenderingLayer {
|
|||
if (this._listenerInstalledOn.has(id)) {
|
||||
continue
|
||||
}
|
||||
if (!map.getSource(this._layername)) {
|
||||
continue
|
||||
}
|
||||
if (this._fetchStore === undefined) {
|
||||
map.setFeatureState(
|
||||
{ source: this._layername, id },
|
||||
|
@ -408,7 +402,11 @@ class LineRenderingLayer {
|
|||
} else {
|
||||
const tags = this._fetchStore(id)
|
||||
this._listenerInstalledOn.add(id)
|
||||
tags.addCallbackAndRunD((properties) => {
|
||||
map.setFeatureState(
|
||||
{ source: this._layername, id },
|
||||
this.calculatePropsFor(feature.properties)
|
||||
)
|
||||
tags.addCallbackD((properties) => {
|
||||
if(!map.getLayer(this._layername)){
|
||||
return
|
||||
}
|
||||
|
|
|
@ -80,7 +80,9 @@ export class MinimapViz implements SpecialVisualization {
|
|||
)
|
||||
|
||||
const mlmap = new UIEventSource(undefined)
|
||||
const mla = new MapLibreAdaptor(mlmap)
|
||||
const mla = new MapLibreAdaptor(mlmap, {
|
||||
rasterLayer: state.mapProperties.rasterLayer
|
||||
})
|
||||
|
||||
mla.maxzoom.setData(17)
|
||||
let zoom = 18
|
||||
|
|
Loading…
Reference in a new issue