Skip to content

Basic Google Maps with autocomplete property editor for Umbraco 8

License

Notifications You must be signed in to change notification settings

Obviuse/Our.Umbraco.GMaps

 
 

Repository files navigation

Our.Umbraco.GMaps - Google Maps for Umbraco 8+

Basic Google Maps with autocomplete property editor for Umbraco 8+ including property value converter.

NuGet NuGet downloads

Features

  • Multi-targeting both Umbraco 8 and Umbraco 9
  • Search for address using autocomplete and place marker
  • Enter coordinates in place marker
  • Click on exact location on map to place marker
  • Drag marker around
  • Set default location & zoomlevel on Data Type settings
  • Zoomlevel is saved on the property to use the same zoomlevel on your website
  • Centerpoint is saved on the property to use the same centerpoint on your website different than the marker.
  • MapType is saved on the property to use the same maptype on your website
  • User your SnazzyMaps API key to set mapstyles

Install

Use NuGet to install Our.Umbraco.GMaps:

Install-Package Our.Umbraco.GMaps

Configuration

You can configure the API Key along with other settings directly in AppSettings as per below:

Umbraco 8

Add the following keys to your web.config AppSettings node:

	<!--Google Maps Configuration-->
	<add key="GoogleMaps:ApiKey" value="" /> <!-- Google Maps API Key -->
	<add key="GoogleMaps:DefaultLocation" value="" /> <!-- Coordinate pair in the format lat,lng -->
	<add key="GoogleMaps:DefaultZoom" value="17" /> <!-- Default Zoom Level for the Maps Property Editor. -->

Umbraco 9

Add the following to your appsettings.json file or equivalent settings provider (Azure KeyVault, Environment, etc.):

  "GoogleMaps": {
    "ApiKey": "",
    "DefaultLocation": "",
    "ZoomLevel": 17
  }

These settings can be overridden by configuring the relevant properties of the Data Type prevalues.

Build NuGet package

PM> nuget pack Our.Umbraco.GMaps.Core\Our.Umbraco.GMaps.Core.csproj -Build

Breaking Changes

  • Coordinates in the strongly typed models are now represented using the Location object with individual Latitude and Longitude properties.

Demo site Umbraco Backoffice Login Details

Username: admin@admin.com
Password: Password123

Special thanks

Special thanks to ronaldbarendse for contributing to this project #h5yr!

Special thanks to prjseal for the Visual Studio project setup and included demo-site #h5yr!

About

Basic Google Maps with autocomplete property editor for Umbraco 8

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 39.6%
  • JavaScript 37.8%
  • C# 21.4%
  • CSS 1.1%
  • ASP.NET 0.1%