When a Salesforce record contains geolocation data, a common requirement is to show this location on a map, for example, to allow field service agents to determine the location of their next job or for a sales rep to plan their day visiting prospects.
In this recipe, we will create a Visualforce page that plots the location of a lead record that was created with geolocation information.
Note
This recipe makes use of the Google Maps API. At the time of writing, the Terms and Conditions of this API provide free use only when your implementation is freely and publicly accessible. In the event that you wish to use this API in a production Salesforce implementation, you will be required to purchase a Google Maps API for Business License. You can find more information at the following Salesforce knowledge article: https://help.salesforce.com/HTViewSolution?id=000188482. The full terms and conditions for the Google Maps API are available from: https://developers.google...