How to Integrate Google Map in Salesforce

A new revised article has been published containing latest coverage : Please check here Google Developers have released the Googl...



A new revised article has been published containing latest coverage : Please check here

Google Developers have released the Google Map V3, which allows you integrate the Google Map snippet in any page layout. This makes it pretty easy to integrate the Google Maps snippet on Salesforce standard objects layout. Here is the quick code that allow you to add Google Map on Account Layout.

Develop a visual force page with the code shared below and integrate this visual force page to Account (standard object layout), how does this work is explain in details below


Unable to display content. Adobe Flash is required.



Source Code - @Dropbox  can be downloaded here


Google Map Api requires address value to show map for the location. Carefully noticing, you will the find the the standard account object has three fields called BillingCity, BillingState and zip code and combining together gives a concrete address, this is key behind the populate right map 

In the snippet below 

var address = "{!Account.BillingStreet}, " + "{!Account.BillingCity}, " + "{!Account.BillingPostalCode}, " + "{!Account.BillingCountry}";

Address is populated with Account object field, that's should be it , below is the screen shot 






What Others Are Reading