Since my effort towards making this control final has been somewhat limited lately, I’ve decided to simply release the code at its current stage so that others can play with it and perhaps we can have something decent done together. The control operation is described in my previous article therefore I will not be going much into it any longer. the deployment of it is something worth mention though…

Download the control form here. Extract the contents of the zip file to a folder and attach the project to your solution, make sure you have the proper EPiServer libraries referenced form the project or it may complain about the references being broken.

Once you have it compiling, copy the GoogleMapEditor.ascx, GoogleMapViewer.ascx and the contents of the resources folder to a folder named GoogleMap within your project folder. Also copy the contents of the lang folder to the lang folder of your site.

The controls the property instantiate try to be smart about resolving the location of its files, but the property does not know its location thus if you decide to place the scripts in a folder other than just GoogleMaps in the app main folder, you need to add to your web.config the following:

<add key="CogGoogleMapControlLocation" value="\GoogleMaps\" />

And in web.config you define the API keys for all the addresses the control will be available from as “CogGoogleMapApiKey_%HOSTNAME%” values.

e.g. set for my machine localhost (for me) & dune(for access from other computers within our network):

<add key="CogGoogleMapApiKey_localhost" value="A value generated for 'localhost'" />
<add key="CogGoogleMapApiKey_dune" value="A value generated for 'dune'" />

The controls determine by themselves which key to use based on the http request so that the Google API does not complain about the key being improper.

Other than this the control should be self registering and all you need to do is to add it to your Page Type in the Admin section of the site and add:

<EPiServer:Property ID="GoogleMapData" runat="server" PropertyName="GoogleMapData" />

to the template you want to use it with.

The control really needs an improved support for translation the stuff currently there is used for learning more that than to actually be useful. Should we decide to go further with it, it definitely will be extended.

The scripts used for the DOPE editing are released under GPL (the scripts were originally released with the MediaWiki GoogleMaps editor under the same license). Those scripts although modified slightly are also released under GPL and are NOT a part of the control – they just happen to be used by it. I am still trying to decide what license use with the rest of the control, so be aware that this is still a subject to be changed, for now just feel free to use the code and should you make any changes to it, please feed them back so that I can improve the control further. The control will most probably end up as a part of Epicode, as soon as I get a response on the epicode forums from Steve on how to add them.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

This entry (Permalink) was posted on Tuesday, April 10th, 2007 at 10:57 am and is filed under ASP.NET, Downloadable, EPiServer, Software Development, Web applications. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response , or trackback from your own site.