diff --git a/frontend-js/src/test/js/google-map-mock.js b/frontend-js/src/test/js/google-map-mock.js index 952df9cbc6272099544cd0240e6a10c2ffceddeb..9db90a0a3a54e0ad45053aa394fcd35148c1086f 100644 --- a/frontend-js/src/test/js/google-map-mock.js +++ b/frontend-js/src/test/js/google-map-mock.js @@ -80,6 +80,9 @@ var google = { getNorthEast : function() { return data.ne; }, + getCenter : function() { + return new google.maps.LatLng((data.ne.lat() + data.sw.lat()) / 2, (data.ne.lng() + data.sw.lng()) / 2); + }, isEmpty : function() { return data.ne === data.sw || (data.ne.lat() === data.sw.lat() && data.ne.lng() === data.sw.lng()); }, @@ -206,6 +209,7 @@ var google = { }, fitBounds : function(bounds) { this.setBounds(bounds); + this.setCenter(bounds.getCenter()); }, }; },