AngularGM is a set of directives for embedding Google Maps in your application using the Google Maps Javascript API.
Latest version: 2.0.1
Install angular-gm
bower install AngularGM
npm install angular-gm
Include the required libraries
<script src="https://github.com/dylanfprice/angular-gm/raw/master//maps.googleapis.com/maps/api/js"></script>
<script src="https://github.com/dylanfprice/angular-gm/raw/master//ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<script src="https://github.com/dylanfprice/angular-gm/raw/master//path/to/angular-gm.js"></script>
Declare a dependency on the AngularGM
module
var app = angular.module('myModule', ['AngularGM']);
Make a map
<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://github.com/dylanfprice/angular-gm.git
AngularGM is tested with karma
$ sudo npm install grunt-cli --global
$ npm install
$ grunt karma:server
You can build the latest version using grunt
.
$ grunt build
You can also view the latest documentation on your local machine.
$ grunt && grunt connect
then go to http://localhost:8000/dist/docs/
Pull Requests welcome!
Dylan Price (the.dylan.price@gmail.com, http://github.com/dylanfprice)
Inspired by Nicolas Laplante's angular-google-maps directive (http://github.com/nlaplante/angular-google-maps)
README and project layout stolen from Olivier Louvignes' AngularStrap repo (http://github.com/mgcrea/angular-strap)
Much of the gmInfoWindow directive code is from the ui-map project
Moved to CHANGELOG.md