Quick start

Obviously, because this module is an AngularJS module, you need first to load AngularJS.

  1. Download the latest version on github or install it using bower:
    bower install angular-google-maps-native
  2. Load it into your HTML pages:
    <script src="path/to/angular-google-maps-native.min.js"></script>
  3. Add GoogleMapsNative into your module requirements:
    angular.module('MyApp', ['GoogleMapsNative'])
  4. The Google Maps API is asynchronously loaded as described on the official page.
    If needed, you can configure it using its provider:
    
    .config(function(gmLibraryProvider) {
        gmLibraryProvider.configure({
          language: 'fr'
        });
    })
  5. Google Maps require a width / height to display maps, prepare your CSS as well, e.g.
    
    gm-map {
        display: block;
        width: 100%;
        height: 300px;
    }
  6. Use the directives in your HTML pages, e.g.
    
    <gm-map options="{center: [37.772323, -122.214897], zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP}">
      <gm-marker options="{position:  [40.750, -73], draggable: true}"></gm-marker>
    </gm-map>