Fix: snapping now also works if the building it snaps to is a multipolygon/relation

This commit is contained in:
Pieter Vander Vennet 2025-03-07 00:32:20 +01:00
parent d224f1fd39
commit fc940c8a7e
4 changed files with 123 additions and 65 deletions

View file

@ -61,7 +61,7 @@
let map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined)
let adaptor = new MapLibreAdaptor(map, mapProperties)
let wayGeojson: Feature<LineString> = GeoOperations.forceLineString(osmWay.asGeoJson())
let wayGeojson: Feature<LineString> = <Feature<LineString>>osmWay.asGeoJson()
adaptor.location.setData(GeoOperations.centerpointCoordinatesObj(wayGeojson))
adaptor.bounds.setData(BBox.get(wayGeojson).pad(2))
adaptor.maxbounds.setData(BBox.get(wayGeojson).pad(2))