214
Views
3
Comments
Solved
[OutSystems Maps] Get actual zoom, center values.
outsystems-maps
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hello,


I want take the actual zoom and the actual map center. I tried using JS with the map Obj and with the map Id but I couldn't take any actual value.


Ps: The Zoom and the center that was changed by the user.


Someone can help me?


Thanks,


2020-03-25 15-04-11
João Ferreira
Staff
Solution

Hi @alexandre filgueira,

I think I've found a solution for you, you need to get those infos, from the map itself, that can been found under the _provider object.

On your scenario...

CENTER.LAT - MapAPI.MapManager.GetMapById('YOUR_MAP_ID')._provider.center.lat()
CENTER.LNG -MapAPI.MapManager.GetMapById('YOUR_MAP_ID')._provider.center.lng()
ZOOM - MapAPI.MapManager.GetMapById('YOUR_MAP_ID')._provider.zoom

Let me know if this helps you,

Best regards,
João Ferreira

UserImage.jpg
alexandre filgueira

Perfect!!!

Thanks!

2022-05-26 21-22-45
walt

Hello @João Ferreira - what else is available under the _provider object?

thank you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.