https://github.com/passy/angular-google-staticmaps
An AngularJS directive to quickly insert Google Static Maps.
https://github.com/passy/angular-google-staticmaps
Last synced: about 1 year ago
JSON representation
An AngularJS directive to quickly insert Google Static Maps.
- Host: GitHub
- URL: https://github.com/passy/angular-google-staticmaps
- Owner: passy
- Created: 2013-07-17T22:53:03.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2020-03-26T15:47:32.000Z (over 6 years ago)
- Last Synced: 2025-04-18T18:33:10.958Z (over 1 year ago)
- Language: CoffeeScript
- Size: 9.77 KB
- Stars: 38
- Watchers: 1
- Forks: 11
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Angular Google Static Maps Directive [](https://travis-ci.org/passy/angular-google-staticmaps) [](https://gemnasium.com/passy/angular-google-staticmaps)
[Homepage](http://passy.github.io/angular-google-staticmaps)
An [AngularJS](http://angularjs.org/) directive to quickly insert [Static
Maps](https://developers.google.com/maps/documentation/staticmaps/).
## 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](http://passy.github.io/angular-google-staticmaps) for a live example.
```html
```
The `markers` attribute is an expression evaluating to either one or multiple
markers. Markers have the following format:
```javascript
$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