angular-google-staticmaps

An AngularJS directive to quickly insert Google Static Maps.

Angular Core Dependency: ~1.3.0

Added by: Sam Deering

GitHub

Repository

passy/angular-google-staticmaps

Stats

Stars: 35

Watchers: 35

Forks: 12

Module Description

Angular Google Static Maps Directive Build Status Dependency Status

Homepage

An AngularJS directive to quickly insert Static Maps.

Usage

  1. bower install --save angular-google-staticmaps
  2. Include dependencies in your HTML.
  3. Load the wu.staticGmap module for your Angular app.
  4. Use the static-gmap directive.

Example

See the homepage for a live example.

<static-gmap size="137x137" markers="markers" sensor="false" zoom="14"></static-gmap>

The markers attribute is an expression evaluating to either one or multiple markers. Markers have the following format:

$scope.markers = [{
    color: 'blue',
    label: 'S',
    coords: [lat, lon]
}];

Attributes

Any attribute is directly passed to the generated URL the image is loaded from, except for markers, which gets formatted according to the specification.

size (required)

The size attribute is required and must be specified as wxh whereby w denotes the width and pixels and h the height.

sensor (required)

The sensor attribute must explicitly be set to either true or false.

Contributing

Pull requests welcome. Only change files in src and don't bump any versions. Please respect the code style in place.

License

MIT

Module stats last updated: 2017-04-15 16:00:04

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!