[Google Maps Mobile] Suggested improvements for Single Location Map

[Google Maps Mobile] Suggested improvements for Single Location Map

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

Hi guys,


I needed to make a changes to SingleLocationMap, that I think would be useful to everyone:

  • Changed the code so that it centers on an address if it is provided, instead of centering on coordinates whenever they are valid. This was an issue becaise (0,0) are valid coordinates, which meant the map wouldn't center on address unless I typed invalid coordinates on the latitude and longitude inputs on purpose.
  • Changed the map initialization actions so that they support loading an API key from local storage. This was needed because usually people don't want to have their API keys hardcodedon the web block's inputs.
  • Added an input parameter for the Marker Icon URL, since I didn't want to have to use the full featured map just so I could customize my marker.

I've attached the modified eSpace to this post, so feel free to use it.

Hi João,

That's awesome, thanks for taking the time to share your work.

We will review your changes as soon as we can and consider them for the next version of the component.

Thanks again, keep up the great work!

Cheers,

Daniel