File tree Expand file tree Collapse file tree 2 files changed +52
-1
lines changed
Expand file tree Collapse file tree 2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 1+ # Angular Google Static Maps Directive
2+
3+ An [ AngularJS] ( http://angularjs.org/ ) directive to quickly insert [ Google Static
4+ Maps] ( https://developers.google.com/maps/documentation/staticmaps/ ) .
5+
6+ ## Usage
7+
8+ 1 . ` bower install --save angular-google-staticmaps `
9+ 2 . Include dependencies in your HTML.
10+ 3 . Load the ` tbc.ngGoogleStaticMaps ` module for your Angular app.
11+ 4 . Use the ` static-google-map ` directive.
12+
13+ ## Example
14+
15+ ``` html
16+ <static-google-map size =" 137x137" markers =" markers" sensor =" false" zoom =" 14" ></static-google-map >
17+ ```
18+
19+ The ` markers ` attribute can contain one or multiple markers.
20+ Markers have the following format:
21+
22+ ``` javascript
23+ $scope .markers = [{
24+ color: ' blue' ,
25+ label: ' S' ,
26+ coords: [lat, lng]
27+ }];
28+ ```
29+
30+ ## Attributes
31+
32+ Any attribute is directly passed to the generated URL the image is loaded from,
33+ except for ` markers ` , which gets formatted according to the specification.
34+
35+ ### ` size ` (required)
36+
37+ The size attribute is required and must be specified as ` WIDTHxHEIGHT ` whereby ` WIDTH `
38+ denotes the width and pixels and ` HEIGHT ` the height.
39+
40+ ### ` sensor ` (required)
41+
42+ The sensor attribute must explicitly be set to either ` true ` or ` false ` .
43+
44+ ## Contributing
45+
46+ Pull requests welcome. Only change files in ` src ` and don't bump any versions.
47+ Please respect the code style in place.
48+
49+ ## License
50+
51+ MIT
Original file line number Diff line number Diff line change 5858 } , '' ) ;
5959 } ;
6060 } )
61- . directive ( 'static-google-map ' , function ( $parse ) {
61+ . directive ( 'staticGoogleMap ' , function ( $parse ) {
6262 return {
6363 template : '<img alt="Google Map">' ,
6464 replace : true ,
You can’t perform that action at this time.
0 commit comments