Site icon Salesforce News Technology Stuff

Lightning:Map show data on Google Map

Winter 19 is rolling for everyone. I have shared some points which I like most in winter 19. Which you can read here.  with winter 19 Salesforce introduce many components, one of them is lightning:map. It is very useful for developers. Previously when you want to show address on google map you need google api key and lots of script to make it happen. With Lightning:map component you don’t need to worry about anything as it provide this functionality out of box. Also we can use this component in standalone app, lightning app, Lightning out and visualforce so we can use it in classic view as well.

Today we will use this component to show child contact address on google map as marker.

To show this we simply use lightning:map tag and will provide data.

Here we have created two wrapper to send data to map component.  Location wrapper is used to store the address while Address wrapper is used to provide marker specific details.

Do you like the component or want to add anything. Let me know in comments section. Happy Programming 🙂

Exit mobile version