Sunday, February 21, 2010

Having custom maps with labelled markers

I checked it first when I thought about having a map with some data/markers on that to provide some information. I checked Google Maps and Google Maps API for that and saw that it is really easy to have a map with markers on it but having some text on the markers is not in the standart API.

Here it is talking about having a LabeledMarker, with an extension from Mike Purvis. I took one of his examples and modified to have a basic mechanism to load a datafile and show it on the map. The original example was showing data from Google docs retrieved in JSON format. As I wanted to keep data locally in a format I know, I modified his example a bit to load data from a file provided as a parameter to the webpage.

Below is an example of that, with for the list of spots I might like to see. I just passed SpotsToSee as data file to the page.



Or, here it is shown with another data file showing some operators I've been working with.



No comments: