forked from ScottieR/angular-google-maps-mock
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgoogle-maps-mock.js
52 lines (52 loc) · 1.22 KB
/
google-maps-mock.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(function(){
window.google = window.google || {
maps: {
Map: function() {
this.fitBounds = (bounds, padding) => {};
this.addListener = () => {};
},
OverlayView : function () {},
Geocoder: function() {},
Marker: function() {
this.addListener = () => {};
this.setPosition = () => {};
this.setMap = () => {};
},
InfoWindow : function() {
this.setContent = () => {};
this.close = () => {};
},
LatLng: function(lat, lng){
this.lat = () => lat;
this.lng = () => lng;
},
Size: function() {},
Animation: {
DROP: ''
},
MapTypeId: {ROADMAP: true},
places: {
Autocomplete: function() {
this.addListener = () => {};
},
AutocompleteService: function() {},
PlacesService: function(obj){
return {
PlacesServiceStatus: {
OK: true
},
textSearch: function(query){
return [];
},
nearbySearch: function(query){
return [];
}
};
}
},
GeocoderStatus: {
OK: 'OK'
}
}
};
})();