Archive for Google Maps Mashup Category Feed

Foodservice Rewards uses Arrowpointe’s / Google Maps Mashup

Foodservice Rewards is using my Google Maps mashup to allow people to see which distributors participate in their program.

They announced it in a seminar last week to their manufacturers and received very positive feedback. Here is their blog post announcing it.

Go see the functionality on their site.


For more information on this functionality, please visit the product page on

Comments off comments feed

MapQuest for AppExchange

MapQuest recently released a mapping application on AppExchange. This is a free application that lets you map an Account or Contact (like you would using the default link to Yahoo! Maps), but adds a cool new feature on the landing page that allows you to find nearby Accounts and Contacts. Pretty slick. Chris Kramer has a good write up on it here.

This obviously has some overlap with the mapping work I do with and Google Maps and it also attacks it in a different way.

I can think of many possible approaches towards mapping data and many different user experiences users would enjoy. How do you choose one?

What do you think? What would you like to see in an application that maps data? How would you design it?

Comments (1) comments feed

Improved Google Maps Mashup

I have recently completed some custom / Google Maps mash-ups for clients and have made some improvements to the whole integration.

First, it has been updated to utilize the PHP5 Toolkit. Performance is improved from the nusoap toolkit. Also, if you are running a PHP 5 version after 5.1.2, the toolkit supports compression, which is great.

Second, I found a really good Google Maps PHP class that allows for additional functionality beyond what Phoogle provides. The adapter I am using now is by Monte Ohrt from You can get it here. I had to make a couple changes to it, but those changes should be going into his next release. Some of the improved functionality this adapter provides is:

  • Ability to use Yahoo! or Google Geocoder APIs: Yahoo! currently supports the US only. Google supports many countries such as United States, Canada, China, Japan, the UK, France, Germany, Italy, and Spain. I have been opting for the Google API, but both work well.
  • Include a sidebar that lists the returned records: Clicking on a sidebar link pops up the corresponding map marker
  • Caching of Geocode lookups. Cache your successful lookups to a MySQL database for faster retrieval the next time you Geocode it. This is an optional feature.
  • Auto centers the map based upon the map markers placed on it
  • Better error handling.
  • Has all the same functionality as Phoogle, so I didn’t lose anything in the transition

I put up a new demo of it in action. For this demo, I decided to get a little fancier and show how a form can drive the results returned in the map. My clients typically want the querying capabilities to be dynamic, so adding forms is common. This demo has a very simple form to demonstrate the capabilities. However, for some of projects, I am building forms dynamically based upon the metadata in the org. Pretty cool!

If you are interested in this functionality being customized for your organization, please visit the product page on the Arrowpointe website and complete the form on that page.

Comments (4) comments feed uses the / Google Maps Mashup is running a customized version of my Maps mashup to help people find locations of Bikram yoga studios across the U.S. I helped them customize a version that uses their instance as a back-end and allows a search by zipcode or city. Check it out at The overall site is still getting setup, but the mapping functionality is there.

If your organization is looking to utilize your database as a back-end for mashing up data with Google Maps, you can download my sample PHP scripts as a start. If you are interested in some outside assistance in doing this, please contact me.

For more information, you can visit:

Comments (1) comments feed

Salesforce & Google Maps Mashup using PHP

After reading this post, check out a more recent post on an improved mashup or visit the Arrowpointe’s product page for this functionality.

I have developed a mash-up of and Google Maps. The script was developed in PHP and utilizes the PHP Nusoap Sforce Toolkit, created by Ryan Choi, to communicate with the Sforce API and Phoogle, developed by System 7 Designs, to communicate with the Google API.

Using the PHP Nusoap toolkit, this script logs into Salesforce and queries for all Account records that have a complete address. After setting up a Phoogle map instance, the script adds each address to the map. In addition to sending the map the latitude and longitude values, it also passes an HTML formatted string that populates each pin with the Account Name, Address and a link to the record in

Salesforce and Google Maps Mashup

The demo is now closed because my web host turned off calls to file_get_contents and I am not planning on re-writing the functionality. I noticed that the code is not running properly on IE. It gets an error and says “Operation Aborted”. I am not sure why. I have found a bunch of posts giving some solutions, but none of them seem to work. Still working on that.

The script has been tested on PHP 4.3.11, 4.4.1 and PHP5. In order for this to work on PHP5, you must download the latest version of the code, which came out on 12/6/2005. Older versions of the code need to use PHP4 because the soapclient class conflicts with another class in many PHP5 installs.

The script is free for download and licensed under the GPL. To get this setup on your own webserver, do the following:

  1. Download the scripts. The zip file contains all of the files you need.

    The included files unique to my development are:

    • MapAccounts.php: This is the primary script.
    • google-map-api-key.php: Holds the Google Maps API key for the web directory.
    • phoogle-extensions.php: I had to extend the Phoogle class.

    The PHP NuSoap Sforce toolkit code was not changed. The master source for this code, as well as other sample files for it, are at its Sourceforge page. The included PHP NuSoap Sforce toolkit files are:

    • salesforce.php: Primary file that defines the salesforce class.
    • nusoap.php
    • partner.wsdl

    I had to make some changes to the Phoogle files. I have communicated these changes to the Phoogle developers so they may get incorporated. The master source for the Phoogle code and documentation on its functionality is located here. The included Phoogle files are:

    • phoogle.php
  2. Sign-up for a Google API key. Google requires you to have a new API key for every web server directory you use.
  3. Enter your API key into the google-map-api-key.php file.
  4. Open the MapAccounts.php file and search for the phrase Enter a default username here. Update the file with your username.
  5. Open the MapAccounts.php file and search for the phrase Enter a default password here. Update the file with your password.
  6. Load all of these files to your web server.
  7. Run the MapAccounts.php file

Phoogle geocodes addresses using the Yahoo Geocode API. I have noticed that the current code has some trouble with multi-line addresses. If you are receiving errors, that could be why.

Please comment on this post and let me know what you think. Also, comment here and add links to how you have used this script or modified it. Have fun!

Updated 12/8/2005:
I made some small tweaks to the code that allows it to be run from within a custom tab so that it leverages the existing Salesforce session and applies all of the user’s visibility settings. I was able to get it working by having a Custom Tab with the following URL: {!API_Session_ID}&srvr={!API_Partner_Server_URL_60}

You are welcome to try it out with the URL at if you want to, but I encourage you to host the PHP files yourself and link to your own files. My pages are NOT running in HTTPS. That’s why you should host them yourself. Also, I could change the code in my files at any time, so your link might break too.

In case you didn’t notice when looking at the code, you can alternatively pass in a username and password using the “un” and “pw” parameters the same way you can do it to log into Salesforce.

Note that the code is sensitive and, therefore, only pulls back Accounts with a complete addresses. Also, things like multi-line addresses or addresses that cannot be geocoded will result in script errors. I don’t have the error handling working now and this is not intended to be service I am providing at this time.

It works in PHP5 now too. The Salesforce PHP Nusoap package was updated on Sourceforge.

Comments (24) comments feed