vrijdag 29 augustus 2008

Google maps support for your asp.net site

I used the club starter kit as a base website template for my soccer team.  It has a location feature where you can put the locations of certain important events (where our next game is, where do we meet up front, where are we having drinks afterwards, etc...).  I though it would be nice to add support for Google maps so we can see where we'll have to play and give my teammates directions.  This way I would already resolve the lame excuses that they usually have for being late.

At first I just looked at the Google website.  Where else would you check how to integrate Google maps in your web app?  I found an entire JavaScript api ready for use so I started hacking away.  Now I must admit JavaScript is not my favorite language, I can manage but that's about it.  Since I believe there will be other developers just like me, someone must have written server controls for it.  And yes there is one available Googlemaps.subgurim (Free for non commercial use)

Just drag an drop the map control into your page, size it decently and put code to position the map in the page_load event handler.  The website contains many useful and simple samples so I won't bore you with implementation details.  You can see the map in action on my soccer's team (gilsboys) website (click the location list hyperlink for more locations).  But I have to warn you if you decide to explore more of the site is in Dutch and my team is not famous for the way we play soccer but more for the drinks and parties afterwards.  I guess it's my way of apologizing already for the pictures that are already available :-)

Check with you later !