angular-google-staticmaps
v0.4.1
Published
An AngularJS directive for Google Static Maps V2.
Downloads
3
Readme
Angular Google Static Maps Directive

An AngularJS directive to quickly insert Static Maps.
Usage
IMPORTANT: This code was copied from https://github.com/passy/angular-google-staticmaps and published to npm to help support one of our old projects we migrated from bower to npm.
npm install angular-google-staticmaps- Include dependencies in your HTML.
- Load the
wu.staticGmapmodule for your Angular app. - Use the
static-gmapdirective.
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
