In a recent post, I had written about my data driven Virtual Earth map mashup example. In that example, I used the ASP.Net Virtual Earth server control, to display traffic camera locations that are stored in SQL Server database.
The VE ASP.Net control makes it extremely easy to take data from a database table and display it on a map. And all of it can be done using server side code. The ASP.Net control allowed me to rapidly prototype the application.
The one problem with the Virtual Earth ASP.Net control is that it cannot be used in a government website free of cost. On the other hand, Google Maps can be used in a public facing government website free of coast.
This prompted me to look for a method for displaying data from a database in GoogleMaps.
There are some ASP.Net controls available for working with GoogleMaps, but nothing that seems to be stable and free. In addition, I wanted to test out calling web-services using the AJAX toolkit from client java-script code. The idea is simple, the data is made available via a web-service. The web-service is consumed by calling it from client java-script. The data is then added to the Google Map layer and displayed. ASP.Net AJAX makes it extremely easy to call web-services from java-script, in addition, the data is made available as an object, allowing you to call properties and fields that were made available in the corresponding C# object in the server side code. After that using the data and adding it to Google Maps is normal java-script code.
Here is the Denver traffic cameras map mashup created using Google Maps: http://www.aggregatedintelligence.com/Samples/GMapsInASP/default.aspx
I will post the code after cleaning it up some.