Google Map Again - Chicago Park District - Indoor and outdoor pools

Published Thursday, November 01, 2007 8:59 PM

So I used my spare time to continue my exploration of Google Map API and my quest to map as many family-oriented resources/facilities in chicago as possible. Today I mapped out the swimming facilities provided by Chicago Park Districts. The data is downloaded from the Chicago Park District website.

And once we have the data, to make a dummy map is quite easy.  The following is the map result:

Google Map Screenshot: Chicago pools

And the interactive map is located at http://www.codexd.info/googlemaps/pools.htm

This map is a little less dummy than my first school map. First, it has made its customized icon, a door icon for an outdoor pool, and a house icon for indoors. The code for making customized icon marker is as below:

function CreateTypeMarker(point, stype, label, html)

{

 

var myIcon = new GIcon();

if(stype=="indoor")

myIcon.image = "images/House.png";

else if(stype=="outdoor")

myIcon.image = "images/Door.png";

 

myIcon.iconAnchor =
new GPoint(16, 16);

myIcon.infoWindowAnchor = new GPoint(16, 0);

myIcon.iconSize = new GSize(20, 20);

myIcon.shadowSize = new GSize(25, 25);

// Set up our GMarkerOptions object

markerOptions = { icon:myIcon };

var marker = new GMarker(point, markerOptions);

GEvent.addListener(marker, "click", function() {

marker.openInfoWindowHtml("<a href='" +html + "'>" + label + "</a></b>"+"<br>"+"<a href='" +html + "'>"+html+"</a></b>" );

});

 

return marker;

}

I also added an GOverviewMapControl at the bottom-right corner and a trafficinfo overlay using the following two lines of code.

map.addControl(new GOverviewMapControl);

map.addOverlay(new GTrafficOverlay());

Easy. It looks good too. 

However, I would like to have some legend information telling me more about the red, green traffic lines on the map. How to do that? Searched again, I could not find any clue.

Maybe next time?

 

by xxXd
Filed under:

Comments

# 74piles Blog Archive » Google Map Again - Chicago Park District - Indoor and outdoor pools said on Monday, November 05, 2007 12:49 AM

Pingback from  74piles  Blog Archive   &raquo; Google Map Again - Chicago Park District - Indoor and outdoor pools

This site

This Blog

Syndication

Sponsors

  • MaximumASP