THIS PACKAGE HAS BEEN DEPRECATED
For all your Map needs please use
https://our.umbraco.org/projects/backoffice-extensions/terratype/
It does everything this package does, plus oodles of more features; Map styles, Razor rendering and multiple map providers.
Purpose
Google map datatype for Umbraco V7,
Why?
Wish to give your content editors easy Google Maps to set real world locations.
Install
Either via Umbraco Package Installer or Nuget with
PM> Install-Package AngularGoogleMaps
NOTE: You may need to restart IIS before the Google Map will show for first time.
Usage
1. Install package via Nuget or Umbraco Package Installer
2. Create a new data type using the new Angular Google Maps property editor
3. Add new data type to document type
4. Create new content based on document type
Options
a. API Key
(Now a requirment to use Google Maps
https://developers.google.com/maps/documentation/javascript/
get-api-key#get-an-api-key)
b. Coordinate System; Choose between WGS-84 which is the international standard or
GCJ-02 which is requirment to comply with Chinese state law
c. Show Search Box - Decide whether to display a Search box to content editor.
To use this feature you MUST enable Places API Web Service in Google Service for
your API Key (See http://tinyurl.com/jjkgz2d)
d. Search box country filter - Restrict search results from one country you pick from a
dropdown list
e. Default location – set a default location for map
f. Map Height – Set the height of the Google map in pixels
g. Hide Label – Decide whether the Map takes up all the space of the editor
h. Hide, show or allow the selected coordinates to be displayed and / or editable
i. Marker Icon - Select an image to use as the map marker
Can select either from a predefined list or
any custom image
j. Format: Choose the format you wish to store your map coordinates
Csv = "latitude,longitude,zoom"
Json = Json object in format
Csv with Search: "latitude,longitude,zoom,icon image,icon shadow image,icon width,
icon height, horizontal anchor, vertical anchor, format,apikey,
coordinate system,search status,search limit,search typed by user"
i. Reduce watches - Only enable if you know what you are doing
Spec
The package contains a single dll installed in the Umbraco /bin/ folder and a collection of css, html & js files stored within the /App_Plugins/AngularGoogleMaps/2.0.3/ folder. The new data type is of type string. If google maps is unable to load, for internet issues for example, then the map will downgrade to a coordinate editor instead, this is by design to allow off net use.
Type Convertor
Dynamic convertor works straight out of the box now, converts property string to AngularGoogleMaps.Model type which contains 15 properties
In a razor page with an AGM property named Map
@{
var lat = CurrentPage.Map.Latitude;
var lng = CurrentPage.Map.Longitude;
var zoom = CurrentPage.Map.Zoom;
// Only works if format is Json or Csv with Search
}
Strongly Typed convertor converts any AGM PropertyValue to AngularGoogleMaps.Model
In a razor page with an AGM property with alias map
@{
var map = Model.Content.GetPropertyValue<AngularGoogleMaps.Model>("map");
var lat = map.Latitude;
var lng = map.Longitude;
var zoom = map.Zoom;
// Only works if format is Json or Csv with Search
}
Log
HAS BEEN DEPRECATED
2.0.3
2.0.2
2.0.1
2.0.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
Future