Google-mapping each week's games (paging geeks)

Submitted by Topher on
So I was linked over to the FBS Google map recently, which pinpoints each Division I-A program and maps each conference's sphere of influence. (Type "NCAA FBS Schools" into Google maps and it will come up.) I was thinking about an idea to map each week's games onto a Google map automatically - then one who loves maps and geography (like myself) Our Fearless Leader isn't hip with the Google APIs and he has plenty to work on with the blog content anyway, so I am asking the board: anybody with mad computer skilz have any idea how to do this? The script/tool would have to: -Read the game info (teams, location and time etc) from a schedule/manifest -Generate map points for each game -Possibly modify the flag shapes/colors on the fly. There could be color-coding for start time and whether the game had kicked off or gone final. I'd be happy to take a stab at this if someone has an idea how to get started. I have software engineering experience but I'm just not sure where to begin.

joeyb

September 11th, 2009 at 7:57 PM ^

It's funny that you are asking this right now. I am in the middle of a school project that involves Google Maps. Unfortunately I am not the one working directly with the API, but I do know that it is fairly simple and it is all in Javascript. First you will include their javascript file for the api(http://maps.google.com/maps?file=api&v=2) Then in another script you have something like this and call initialize onload. Someone else did this so I can't help you out too much with it, but for each location just add a line like this. map.addOverlay(createContactMarker(new GLatLng(43.01, -83.71), "Label1")); To look up the coordinates use the code in showLocation and findEmergencyLocation. I don't know much past that, but that should give you enough to get you started. function initialize() { map = new GMap2(document.getElementById("map_canvas")); map.setUIToDefault(); geocoder = new GClientGeocoder(); function createEmergencyMarker(point) { var emergencyIcon = new GIcon(G_DEFAULT_ICON); emergencyIcon.image = "http://www.google.com/mapfiles/markerE.png"; markerOptions = { icon:emergencyIcon }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("EMERGENCY LOCATION"); }); return marker; } function createContactMarker(point, number) { var contactIcon = new GIcon(G_DEFAULT_ICON); markerOptions = { icon:contactIcon }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(number); }); return marker; } // emergency location generated by server code var emergencyLocation = new GLatLng(43.012367087445014, -83.7126874923706); map.addOverlay(createEmergencyMarker(emergencyLocation)); map.setCenter(emergencyLocation, 15); // emergency contact location markers generated by server code map.addOverlay(createContactMarker(new GLatLng(43.01, -83.71), "Label1")); map.addOverlay(createContactMarker(new GLatLng(43.01, -83.70), "Label2")); } function findEmergencyLocation(response) { map.clearOverlays(); if (!response || response.Status.code != 200) { alert("Cannot find emergency location."); } else { place = response.Placemark[0]; window.location = "http://localhost:1234/mode=map&latitude=" + place.Point.coordinates[1] + "&longitude=" + place.Point.coordinates[0]; } } function showLocation() { var address = document.forms[0].q.value; geocoder.getLocations(address, findEmergencyLocation); }

SF_Wolverine

September 11th, 2009 at 8:26 PM ^

I have developed a few projects using the Google Maps API in Flash and I agree that it's pretty simple to use. You can dl the latest version of Flash CS4 from adobe.com and use it for 30 days unrestricted. Actionscript is a pretty easy OOP language to pick up too. There are probably enough web services out there to handle most of the things you are trying to accomplish. Feel free to ping me here if you have any specific questions. It sounds like a fun project.

Bronco648

September 12th, 2009 at 9:06 AM ^

You might need a Google Analytics account to access the developers kit. It's free but you do need to register. MapQuest has something similar as well (I think).

Mgobowl

September 12th, 2009 at 10:00 AM ^

Not sure if it's related or not because I'm not up on all the computer programming stuff, but Google Calendar now has sports calendars available. They pull the schedule from somewhere and put it on your calendar. They have MLB, NFL, NCAA, etc. I'm thinking the map thing might be along the same lines? I was going to try to link to it, but I think I would be linking to my own calendar. In the upper right corner of Google Calendars is the link to "new: sports calendars" if anyone is interested.