Skip to content

Commit 8a2ee4b

Browse files
committed
Guard angulargmDefaults in a function so it only gets run if AngularGM is loaded.
1 parent b8b69a1 commit 8a2ee4b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/module.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@
4242
* });
4343
* ```
4444
*/
45-
value('angulargmDefaults', {
46-
'precision': 3,
47-
'markerConstructor': google.maps.Marker,
48-
'polylineConstructor': google.maps.Polyline,
49-
'mapOptions': {
50-
zoom : 8,
51-
center : new google.maps.LatLng(46, -120),
52-
mapTypeId : google.maps.MapTypeId.ROADMAP
53-
}
45+
factory('angulargmDefaults', function() {
46+
return {
47+
'precision': 3,
48+
'markerConstructor': google.maps.Marker,
49+
'polylineConstructor': google.maps.Polyline,
50+
'mapOptions': {
51+
zoom : 8,
52+
center : new google.maps.LatLng(46, -120),
53+
mapTypeId : google.maps.MapTypeId.ROADMAP
54+
}
55+
};
5456
});
5557

5658
})();

0 commit comments

Comments
 (0)