For some years now I have been developing the Google Maps .NET Control. The response I have been getting has been overwhelmingly positive. In a more literal sense it has also been simply overwhelming. Keeping up to date with Google's ever developing API, coding a .NET wrapper to make use of all these features and testing it, is a lot of work. On top of this there is the work that goes in to helping people implement the control in their own sites and applications.
As you may have noticed this load has meant that the release of new versions has slowed recently. However I am happy to announce a new version with lots of exciting features. More about that later, because I think the most exciting feature is that, thanks to a generous supporter, the source code is now available, free of charge. I am very happy it was possible to get this done before the Google Developer Day, and I hope to meet some of the many ASP.NET Google Maps developers there.
You can download the source code from the Subversion (SVN) server -
svn://svn.reimers.dk. I am going to continue to post stable builds on the site, but now if you have ideas for development, or simply want to tweak the code, you can do so at your own pace.
So what are the new features of the latest version?Event handlers now follow the recommended signature (object, EventArgs). This is a breaking change to the way events are handled, and you will need to update your code. The EventArgs argument of all event handlers inherits from the MapEventArgs, which has two properties, Map and MapCommand. So where you used to assign a command to the MapCommand, you should now assign it to e.MapCommand. The signature of the event handler also needs to change, but it is a fairly minor inconvenience. The reason for this change is that the control is being prepped for ASP.NET AJAX. I think it is to be considered sufficiently widespread, that it should be supported directly. Furthermore ASP.NET AJAX is part of .NET 3.5, and with this change you can compile with .NET 3.5. While this is cool in itself, it is also a necessary point for moving on to support Silverlight. Yes, Google Maps in Silverlight is a thing I would like to see soon (at least to coincide with the stable release of Silverlight).
API version selection was a user request. This feature allows you to specify if the Google API version to be downloaded should be the latest (for all those exciting new features), the stable (if you don't want to risk buggy features) or the release version (new features are considered stablem but not bug free).
Apart from selecting which version you want to load, you can also choose how to load the API script. The default way has always been to load the script in the beginning of the body. But now you can choose to make use of
Google's AJAX API and load it at a later stage, for example, when the map tab on the page is actually selected. The AjaxScriptLoad property lets you select the load manner.
The
Google Earth API has been included as the Google3DMapType. This allows you to load a 3D Google Earth map directly in your browser. This is just scratching the surface for the the GE API. There are tons of new features that need to be implemented, and that will be for a later version.
One of the most exciting things, from my point of view, is the development of the
GoogleStaticMap control. From being a mere picture to display, you can now accept click events from that map as well. Clicking only works for the map, not any overlays. But you can let your server find out what was clicked. If you don't have any advanced map features, then this gives you an interactive map, with a minimum download requirement for your users. I have previously mentioned this feature in the post about Google Maps for mobile phones, but it has not previously been part of the map assembly.
Behind the scenes the
KML parsing has been improved. This has always been a sore point for me, as the KML standard continues to evolve, but not all features apply to the Map API. However with the inclusion of the Google Earth API, reading and writing KML has become more relevant.
This is a large release and I know a lot of you would like to see code samples. But now that you have the source code you can see how it works and hopefully contribute your own code samples.
Happy coding.