Using Google map in EPiServer:
Requirements:
EPiServer 4.61
ASP.Net 2.0
A Google map API key ( You can get one at : http://www.google.com/apis/maps/signup.html ) . This will require that you have a real hostname on your site. For test purpose you can change in your <system32 folder>/drivers/etc/host so that Google will think you are at right site. E g I added following line in my host file:
www.TestGmap.com 127.0.0.1
and at the signup page I entered the www.testgmap.com as url. And when I develop on my laptop I browser to http://www.testgmap.com instead of http://localhost .
Optional:
Visual Studio 2005 with Web Application Project or Visual Studio 2005 sp1 (if you want to make changes). You can find source code in your EPiServer folder after installation.
Installation:
1. Unzip the googlemap.zip
2. Login with a windows account to your EPiServer and go to admin-mode
3. Click on import under “tools” and import the package "googlemap.epi4".
4. Switch to edit-mode and switch back to admin-mode.
5. Now you will find “Google map key manager” under tools.
6. Click on “Google map key manager” and you can put your Google map API key there.
Usage:
1. create a Google map page in edit-mode
2. In advanced tab choose the center of map, width of map and height of map.
3. In information map you could do following:
1. Point one place to show
2. Point a “Google map” pagelist.
3. Point a external data source to show.
Google map page type will first check if it has external data then the list. If it still not find any it will show the point.
With the external data source you can point an url ( e g http://www.test.com/test.aspx ) and that url need to return a file with pois and the format for the data is like following:
<poi><city>some where1</city><country>some where</country><gpoint><lat>54.720001</lat><lng>12.01</lng></gpoint><icon></icon><info>Place nr 1</info></poi>
<poi><city>some where1</city><country>some where</country><gpoint><lat>57.710001</lat><lng>12.01</lng></gpoint><icon></icon><info>Place nr 2</info></poi>
<poi><city>some where1</city><country>some where</country><gpoint><lat>56.70001</lat><lng>12.01</lng></gpoint><icon></icon><info>Place nr 3</info></poi>
You can leave the gpoint empty if you don’t have the geocode. In that case it will try to figure it out by get geocode from Google with city and country information. Sometime it works well but not all the time.
In the package there is a googlemaps.csproj which you can open with Visual studio 2005 and make changes.
Questions/Comments?
Please send an email to:
nospam@localhost
mnospam@localhost
@nospam@localhost
episerver.comnospam@localhost
Copyright (C) EPiServer AB
2010 All rights reserved.
This software is unsupported and provided "as is".
EPiServer AB is not to be held responsible in any way for any damage or loss of income and/or data due to the use of the software.