Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Google Maps Location

Google Maps Location introduces a new property type to EPiServer CMS which allows the editor to select a location (address, latitude and longitude) by placing a marker on a Google Maps map. The value is stored as a custom type, "GoogleMapsLocation", which means that access to the address and coordinates is strongly typed. In many ways this project is simillar to the GoogleMaps project, especially to it's GeoPicker property. It does however differ in two ways. First of all this property type aims to be more user friendly. It also differs as the property value is strongly typed.

Screenshot of the popup window where the editor can select a location

The propertys part of the edit view for a page when populated with a value

Features

  • Allows the editor to specify a valid Google Maps location in an intuitive way
  • Strongly typed access to specified locations
  • It is possible to specify multiple API keys, standard zoom level and map center when no marker is set

Update 2011-10-20 by Magnus Unger: CMS 6 version with Google Maps v3 support

Configuration

While no configuration is necessary an alert-box will be displayed when selecting a location unless a valid Google Maps API key is specified. One or several API-keys can be added as AppSettings. The keys should be named GoogleMapsKey_<hostname>.

<add key="GoogleMapsKey_localhost" 
    value="ABQIAAAAywoXgmm79IMA7ROWRPMETBT2yXp"/>
<add key="GoogleMapsKey_www.nansen.se" 
    value="ZAY8_ufC3CFXhHIE1NvwkxRf28wlfK"/>

There are also three other configuration options, all specified as AppSettings. GoogleMapsLocationDefaultCenter specifies the default coordinates, separated by a comma, at which the map will be centered if a value is not already specified for the page. GoogleMapsLocationDefaultZoomLevel specifies the default zoom level if no value is set. If these settings are not specified in web.config they will default to 5 as zoom level and Skeppsbron 34 in Stockholm as center.

GoogleMapsLocationCurrentLocationZoomLevel specifies the default zoom level when a value is previously set for the page. It will default to 13 if the AppSetting isn’t specified.

<add key="GoogleMapsLocationDefaultCenter" 
     value="59.3239999,18.0753597"/>
<add key="GoogleMapsLocationDefaultZoomLevel" value="5"/>
<add key="GoogleMapsLocationCurrentLocationZoomLevel" value="5"/>

NOTE: API-keys not needed in the CMS 6 plugin as it uses Google Maps v3

Download

down.gif Download Now

Support

Tickets for this component:

#132
Added a UserControl to display the map in EpiServer View mode (5.x)
#312
Longer addresses are truncated
#348
EPiServer 7 compatibility

Ask a question

Requires login.


Report a bug

Requires login.


Add a feature request

Requires login.


Source Code

5.x folder contains CMS 5 version and Google Maps v2
6.x folder contains CMS 6 version and Google Maps v3

Requirements

Runtime:

  • EPiServer CMS 5R2 or CMS 6
  • ASP.NET 3.5 or higher

If you want to change and compile the source code:

  • Visual Studio 2008

More information

A bit more information about this project can be found in this blog post.

Attachments

  • Map.jpg (83.6 KB) - added by joelab@… 8 years ago. Screenshot of the popup window where the editor can select a location
  • SelectedValue.jpg (8.6 KB) - added by joelab@… 8 years ago. The propertys part of the edit view for a page when populated with a value