mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
feat: expose marker altitude in variables (as "alt")
This commit is contained in:
parent
d54843bbe2
commit
6b67ce26a1
2 changed files with 4 additions and 1 deletions
|
@ -608,6 +608,7 @@ U.FeatureMixin = {
|
||||||
properties.lat = center.lat
|
properties.lat = center.lat
|
||||||
properties.lon = center.lng
|
properties.lon = center.lng
|
||||||
properties.lng = center.lng
|
properties.lng = center.lng
|
||||||
|
properties.alt = this._latlng?.alt
|
||||||
if (typeof this.getMeasure !== 'undefined') {
|
if (typeof this.getMeasure !== 'undefined') {
|
||||||
properties.measure = this.getMeasure()
|
properties.measure = this.getMeasure()
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ DATALAYER_DATA = {
|
||||||
},
|
},
|
||||||
"geometry": {
|
"geometry": {
|
||||||
"type": "Point",
|
"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}
|
Lang: {lang}
|
||||||
Lat: {lat}
|
Lat: {lat}
|
||||||
Lon: {lon}
|
Lon: {lon}
|
||||||
|
Alt: {alt}
|
||||||
Zoom: {zoom}
|
Zoom: {zoom}
|
||||||
Layer: {layer}
|
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("Lang: en")).to_be_visible()
|
||||||
expect(page.get_by_text("Lat: 48.5529")).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("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("Zoom: 7")).to_be_visible()
|
||||||
expect(page.get_by_text("Layer: test datalayer")).to_be_visible()
|
expect(page.get_by_text("Layer: test datalayer")).to_be_visible()
|
||||||
|
|
Loading…
Reference in a new issue