File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 76
76
this . dragging = false ;
77
77
this . selector = o . container ;
78
78
this . markers = [ ] ;
79
+ this . options = o . options ;
79
80
80
81
this . draw = function ( ) {
81
82
88
89
89
90
// Create a new map instance
90
91
91
- _instance = new google . maps . Map ( that . selector , {
92
+ _instance = new google . maps . Map ( that . selector , angular . extend ( that . options , {
92
93
center : that . center ,
93
94
zoom : that . zoom ,
94
95
draggable : that . draggable ,
95
96
mapTypeId : google . maps . MapTypeId . ROADMAP
96
- } ) ;
97
+ } ) ) ;
97
98
98
99
google . maps . event . addListener ( _instance , "dragstart" ,
99
100
357
358
}
358
359
359
360
angular . element ( element ) . addClass ( "angular-google-map" ) ;
361
+
362
+ // Parse options
363
+ var opts = { options : { } } ;
364
+ if ( attrs . options ) {
365
+ opts . options = angular . fromJson ( attrs . options ) ;
366
+ }
360
367
361
368
// Create our model
362
- var _m = new MapModel ( {
369
+ var _m = new MapModel ( angular . extend ( opts , {
363
370
container : element [ 0 ] ,
364
371
center : new google . maps . LatLng ( scope . center . lat , scope . center . lng ) ,
365
372
draggable : attrs . draggable == "true" ,
366
373
zoom : scope . zoom
367
- } ) ;
374
+ } ) ) ;
368
375
369
376
_m . on ( "drag" , function ( ) {
370
377
You can’t perform that action at this time.
0 commit comments