feat: expose marker altitude in variables (as "alt")

This commit is contained in:
Yohan Boniface 2024-07-23 21:33:04 +02:00
parent d54843bbe2
commit 6b67ce26a1
2 changed files with 4 additions and 1 deletions

View file

@ -608,6 +608,7 @@ U.FeatureMixin = {
properties.lat = center.lat
properties.lon = center.lng
properties.lng = center.lng
properties.alt = this._latlng?.alt
if (typeof this.getMeasure !== 'undefined') {
properties.measure = this.getMeasure()
}

View file

@ -19,7 +19,7 @@ DATALAYER_DATA = {
},
"geometry": {
"type": "Point",
"coordinates": [14.6889, 48.5529],
"coordinates": [14.6889, 48.5529, 241],
},
},
],
@ -88,6 +88,7 @@ def test_extended_properties_in_popup(live_server, map, page, bootstrap):
Lang: {lang}
Lat: {lat}
Lon: {lon}
Alt: {alt}
Zoom: {zoom}
Layer: {layer}
"""
@ -102,5 +103,6 @@ def test_extended_properties_in_popup(live_server, map, page, bootstrap):
expect(page.get_by_text("Lang: en")).to_be_visible()
expect(page.get_by_text("Lat: 48.5529")).to_be_visible()
expect(page.get_by_text("Lon: 14.6889")).to_be_visible()
expect(page.get_by_text("Alt: 241")).to_be_visible()
expect(page.get_by_text("Zoom: 7")).to_be_visible()
expect(page.get_by_text("Layer: test datalayer")).to_be_visible()