Remove dead code

This commit is contained in:
Fawad Mirzad
2021-03-18 22:44:31 +01:00
parent b229acc7a5
commit 9f3894aeb1
4 changed files with 0 additions and 169 deletions

View File

@@ -1,14 +0,0 @@
export function fitMapToMarkers(geoCoordinates, mapInstance) {
/* eslint-disable no-undef */
const bounds = new google.maps.LatLngBounds();
if (geoCoordinates.length === 1) {
mapInstance.setCenter({lat: geoCoordinates[0].position.lat, lng: geoCoordinates[0].position.lng});
mapInstance.setZoom(16);
} else if (geoCoordinates.length > 0) {
geoCoordinates.forEach(geoCoordinate => {
if (geoCoordinate.location.lat && geoCoordinate.location.lng)
bounds.extend({lat: geoCoordinate.location.lat, lng: geoCoordinate.location.lng});
});
mapInstance.fitBounds(bounds);
}
}