Save data, conditionally load google maps.
1 person uses it
Submitted by: 840789? janantala

adaptive-googlemaps v0.1.2 Build Status

This module allows you to adapt googlemaps component for different occasions. - static google map - open map in a new tab / a native mobile application - load dynamic google map


Check out


  • AngularJS v 1.0+
  • Googlemaps script


We use bower for dependency management. Add

To your bower.json file. Then run

This will copy the angular-isbn files into your bower_components folder, along with its dependencies. Load the script files in your application:

Add the adaptive.googlemaps module as a dependency to your application module:

Add googlemaps element into your template

Directive attributes


  • sensor="false" // true, false
  • size="500x300" // width x height
  • zoom="6"
  • center="California"


  • markers="['San Francisco', 'San Jose']"
  • maptype="roadmap" // roadmap, satellite, terrain, hybrid
  • mapevents="{redirect: true, loadmap: false}"

mapevents: { "redirect": false, "loadmap": true }

Loads dynamic google map.

{ "redirect": true, "loadmap": false }

Opens google map in a new tab / a native mobile application.

mapevents: no mapevents

Nothing happens.


Contributions are welcome. Please make a pull request against canary branch and do not bump versions. Also include tests.


  • Let the device/browser decide what kinds of map events will be used. Example: mobile device will open native maps application, browser with fast internet connection will auto load dynamic map...


More tests will be added...

We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use grunt:

The karma task will try to open Chrome as a browser in which to run the tests. Make sure this is available or change the configuration in test/test.config.js


If you are looking just for static google maps you can use angular-google-staticmaps repository.


The MIT License

Copyright (c) 2013 Jan Antala,

comments powered by Disqus
This page was last updated about 5 years ago.