Using Google Maps in Visualforce
In this article you will learn how to integrate Google maps within a Visualforce page to enhance your end users experience managing addresses and much more!
Showing a map alongside an address is really useful for your end users. In this tutorial you will learn how to extend Salesforce by including a Google Map within a Visualforce page and then displaying this on a page layout. This tutorial is intended to be a gentle introduction to Visualforce for Salesforce administrators with no past experience developing in Visualforce. In this tutorial we will cover not only how to use Google Maps within Visualforce, but all of the steps needed from beginning to the end and everything in between.
What are we going to build?
We are going to create a Visualforce page to display a Google Map displaying the address of an account in Salesforce. This will be displayed on the page layout.
What tools do I need?
Everything you need to get going is within Salesforce. You don’t need any tools for this tutorial, all you need is somewhere to do your coding!
Unless you are the administrator, you may need to ask for additional permissions from your system administrator to allow you to customise your Salesforce org. It advise to do the following within a sandbox or use a developer org so not to interfere with your production system.
If you would like to have your own Salesforce org where you can safely learn and customise, then go to http://developer.force.com and register for a Developer Edition org. These orgs are intended for people to learn and develop new applications for the platform.
Salesforce will now ask you for a name you want to use for the page. Provide a useful name such as the following:
You should now see your first Visualforce page ready to be edited within the developer console.