Google Maps Hacking for Sforce: Sample Now Available

by Adam Gross on June 20, 2005 at 12:28 PM

There are many reasons why Google Maps is such a beautiful thing; its a very useful app, has a brilliant UI, an innovative implementation, and reinvents what was thought to be a "solved" problem.  But the part has got us (and many others!) excited to the ability to remix (or hack) the service and reuse the maps widget in all sorts of interesting new contexts.  (The popular housingmaps.com, for example, turns Google Maps into a browser for apartment listings.)

Combine Google Maps and our Sforce Web service API, and you'll quickly see how useful the maps widget is in real world business contexts, such as mapping customers, leads or other CRM data.  Add in the new Multiforce deployment options of Summer 05 and a pinch of Java code, and you've got an on demand mapping application that rivals 6-figure alternatives.

Sforcegmapsscreenshot_1

 

 

 

 

 

 

 

 

 

 

 

 


Google Maps shown plotting Account locations as part of a Multiforce custom app

While there is no official API for Google Maps, the good news is that there are utilities out there (like mygmaps.com) that make remixing the maps fairly straightforward.  The bad news is that none of this is "official" or "supported" by Google, so while its great for doing some demos and experimentation, if you do anything in production it could stop working at anytime - so approach with caution.

To share the love (and let you create demos that we promise will impress your friends and co workers ), we've packaged up the sample code used to create the Google Maps/Sforce integration shown above and published it here.  The sample includes a single JSP, along with helper Java classes and .js JavaScript files that essentially converts a SOQL query into the necessary XML format for Google Maps. Its a bit raw, but functional, and easily modifiable to scope the specific set of data you want to plot.  (One popular example here is showing all the new leads for the past 24 hours plotted on one map.)

As always, you will likely want to use a free Developer Edition account from sforce.com to test this will before you let it loose on your real data.

If you have additions to the sample, or examples of how you've used Google Maps with Sforce at your company, let us know!

If you are new to Sforce, you may find the Sforce Explorer and other tools, freely downloadable at http://sforce.sf.net/, useful.

Download sforce-gmaps.war (Best deployed on Tomcat 4.x, running JDK 1.4.2_x)

Download sforce-gmaps.zip

Comments

Posted by Al on June 30, 2005 02:08 PM:

fyi, Google just published their own map API today.

http://www.google.com/apis/maps/documentation/

Posted by Benji Jasik on June 30, 2005 02:31 PM:

Thanks for letting us know! We're working on making this "hack" legit. Stay tuned!

Posted by Aiden on August 19, 2005 06:19 AM:

Hi,
How can I set the google map to initially show Canada instead of the US?
Thanks.

Posted by sfphotogirl on August 19, 2005 12:33 PM:

thought you might find this new tool from smugmug interesting. i love those google maps...
maps.smugmug.com

Posted by edu on October 5, 2005 06:12 AM:

If you are interested Google Maps and Ajax maybe you would like

http://www.panoramio.com

Posted by Scott on January 17, 2006 02:02 PM:

I developed a Google Map mashup using PHP. It uses the NuSoap PHP toolkit and Phoogle, which is a PHP class to hook in to Google Maps.

http://sfdc.arrowpointe.com/2005/11/28/salesforce-google-maps-mashup-using-php/

Posted by Jacob Minett on March 21, 2006 08:20 AM:

Do you need enterprise edition for this to work? Will this work with Professional version?

Posted by Ed on August 17, 2006 04:20 PM:

How do you install google maps?

Posted by tb on October 12, 2006 04:40 AM:

It did work even for non US countries with little adaptation.

How great it is !

Anyway Yahoo Maps mash up seems more reliable for europe (France at least...)

Post a comment

If you have a TypeKey or TypePad account, please Sign In