[Google Maps Mobile] How to move around the marker to get new address / coordinates?

[Google Maps Mobile] How to move around the marker to get new address / coordinates?

  
Forge Component
(5)
Published on 21 Jul (4 weeks ago) by OutSystems Labs
5 votes
Published on 21 Jul (4 weeks ago) by OutSystems Labs

Hi, I need to let users move either the map marker to get new address / coordinates is this possible? If so how to implement this?

Or the other way around, let the users move around the map with the map marker stand still to get new address / coordinates.

Many thanks

Hi Eric,

You have an example of that behavior on this component.

Let me know if it worked.

Cheers,

Solution

Hi Eric,

You can look at my component sample too...

Try here: https://harlin.outsystemscloud.com/Overlay_Sample/

Forge: https://www.outsystems.com/forge/component/2006/google-maps-overlay/


Basically, the steps are:

1. set marker options as draggable

2. create marker event "dragend", with JavaScript handler that change the value of input text (can be hidden too if needed).


In Outsystems, set name of your input widget, then you can reference it in Javascript by:

document.getElementById('"+myinput.id+"')

Solution

Thanks all