Falcosc / locus-addon-tasker

Locus Maps API useable as Tasker Plugin
GNU General Public License v3.0
9 stars 2 forks source link

%map_center_altitude #22

Closed TapioOfTapiola closed 3 years ago

TapioOfTapiola commented 3 years ago

Hi Falco,

if possible, can you implement %map_center_altitude?

thx, br

Falcosc commented 3 years ago

Should be possible, but we have to see if it is actually populated.

Falcosc commented 3 years ago

No, not possible https://github.com/asamm/locus-api/blob/5e4e9a7a03cff367da217923040cf4655e8e726c/locus-api-android/src/main/java/locus/api/android/features/periodicUpdates/UpdateContainer.kt#L155 does not get any altitude value despite having the feature for displaying altitude at cursor position activated. And it is not possible to request altitude of any coordinates over API.

You have to request the feature in the API and describe your use case. For example, do you need the altitude of the map center or the altitude of the cursor position in case the cursor is not in the center.

TapioOfTapiola commented 3 years ago

Thx, I'll ask Menion for exposing it to the API... I'm creating sweetly formatted addresses from Locus Map center with help of osm nominatim.openstreetmap.org - great API if you want to include waywarks/buildings etc... And I'd love to include Altitude of the place. Example result from one of my scripts and how I'd like to use altitude:

Wanderparkplatz Ochsenkopf, L 685, 59821 Arnsberg, Hochsauerlandkreis, 405 m. ΓΌ. NN

https://www.google.com/maps/search/?api=1&query=51.35635,8.04161

N51Β°21.3807', E008Β°02.4965' N51.356346, E008.041608

TapioOfTapiola commented 3 years ago

Hey Falco, Menion has added it to the latest beta... so may you please add it? πŸŽ‰πŸ˜€πŸ™ https://help.locusmap.eu/topic/25383-add-map_center_alt-to-api

Falcosc commented 3 years ago

@tortuosit does it work?