forked from MapComplete/MapComplete
Robustify code
This commit is contained in:
parent
1dbe167e4e
commit
15a1ab19cd
2 changed files with 19 additions and 20 deletions
|
@ -157,7 +157,6 @@ export default class ShowDataLayer {
|
|||
const coords = L.GeoJSON.coordsToLatLngs(feat.geometry.coordinates)
|
||||
const tagsSource = this.allElements?.addOrGetElement(feat) ?? new UIEventSource<any>(feat.properties);
|
||||
let offsettedLine;
|
||||
console.log("Rendering ", feat)
|
||||
tagsSource
|
||||
.map(tags => this._layerToShow.lineRendering[feat.lineRenderingIndex].GenerateLeafletStyle(tags))
|
||||
.withEqualityStabilized((a, b) => {
|
||||
|
@ -170,7 +169,6 @@ export default class ShowDataLayer {
|
|||
return a.offset === b.offset && a.color === b.color && a.weight === b.weight && a.dashArray === b.dashArray
|
||||
})
|
||||
.addCallbackAndRunD(lineStyle => {
|
||||
console.log("Linestyle is ", lineStyle)
|
||||
if (offsettedLine !== undefined) {
|
||||
self.geoLayer.removeLayer(offsettedLine)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue