Skip to content

Commit 1d0d2a1

Browse files
authored
Update stub.js
add support for toJSON for LatLngBounds
1 parent 225b2b9 commit 1d0d2a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stub.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ window.google = {
5555
return {
5656
getSouthWest: function() { return sw; },
5757
getNorthEast: function() { return ne; },
58+
toJSON: () => ({
59+
south: sw ? (sw.lat || sw.latitude) : 0,
60+
north: ne ? (ne.lat || ne.latitude) : 0,
61+
west: sw ? (sw.lng || sw.longitude) : 0,
62+
east: ne ? (ne.lng || ne.longitude) : 0,
63+
}),
5864
};
5965
},
6066
Map: function() {

0 commit comments

Comments
 (0)