AngularJS Google Maps Directives
22 people use it


AngularGM is a set of directives for embedding Google Maps in your application using the Google Maps Javascript API.

Example Plunkers


  • Bi-directional association of map bounds, center, and zoom with scope variables
  • Multiple Google Maps can be embedded in the same page
  • Works with ngView and reuses map instances so there is no memory leak
  • Bind custom objects to markers
  • Listen for and generate events on markers/objects
  • Create InfoWindows which compile Angular expressions (credit goes to ui-map for this feature)

Documentation and Examples

Quick Start

Include the required libraries html <script src="//"></script> <script src="//"></script> <script src="//"></script> <script src="//"></script>

Declare a dependency on the AngularGM module javascript var app = angular.module('myModule', ['AngularGM']);

Make a map html <gm-map gm-map-id="'myMap'" gm-center="center" gm-zoom="zoom" gm-bounds="bounds" gm-map-type-id="mapTypeId" style="width:500px;height:500px;"></gm-map>


Clone the repo, git clone git://

AngularGM is tested with karma

You can build the latest version using grunt.

Pull Requests welcome!


Dylan Price (


Inspired by Nicolas Laplante's angular-google-maps directive (

README and project layout stolen from Olivier Louvignes' AngularStrap repo (

Much of the gmInfoWindow directive code is from the ui-map project


Note these are not comprehensive commit lists but represent what I consider the most significant changes. You can always see a full changelog with git log v0.2.0..v0.1.1.



  • If you use the getMapPromise method of angulargmContainer, you may want to make sure your configuration is in a run function. If you do configuration in a controller it will get re-run on the same map instance every time the controller is re-instantiated.
  • view commit • Added gmMapResize event to gmMap.
  • view commit • Make gmMarkersRedraw event more flexible.
  • view commit • Fixes #3. Reuse google map instances.
  • view commit • Update to angular 1.0.7.
comments powered by Disqus
This page was last updated over 4 years ago.