Refacotring: update to maplibre 3.4, drop dependency on intermediate library

This commit is contained in:
Pieter Vander Vennet 2023-07-16 04:24:32 +02:00
parent 426620a76c
commit 319db1a1c8
4 changed files with 510 additions and 156 deletions

View file

@ -161,13 +161,13 @@ class PointRenderingLayer {
})
}
const marker = new Marker(el).setLngLat(loc).setOffset(iconAnchor).addTo(this._map)
const marker = new Marker({ element: el}).setLngLat(loc).setOffset(iconAnchor).addTo(this._map)
store
.map((tags) => this._config.pitchAlignment.GetRenderValue(tags).Subs(tags).txt)
.addCallbackAndRun((pitchAligment) => marker.setPitchAlignment(pitchAligment))
.addCallbackAndRun((pitchAligment) => marker.setPitchAlignment(<any> pitchAligment))
store
.map((tags) => this._config.rotationAlignment.GetRenderValue(tags).Subs(tags).txt)
.addCallbackAndRun((pitchAligment) => marker.setRotationAlignment(pitchAligment))
.addCallbackAndRun((pitchAligment) => marker.setRotationAlignment(<any> pitchAligment))
if (feature.geometry.type === "Point") {
// When the tags get 'pinged', check that the location didn't change
store.addCallbackAndRunD(() => {