Я хочу, чтобы канцелярские кнопки были видны вокруг канцелярской кнопки местоположения пользователя. я написал следующий код, он центрирует местоположение пользователя, но несколько кнопок выходят за пределы карты ??
К вашему сведению: userPinLoc — это объект канцелярской кнопки, который уже заполнен
function setInitialZoom() {
mapZoom = googleMap.getZoom();
var bounds = new google.maps.LatLngBounds();
bounds.extend(userPinLoc);
for (i in nearestEntitiesToZoom) {
entity = nearestEntitiesToZoom[i];
var googleLatLng = new google.maps.LatLng(entity.latitude,entity.longitude);
bounds.extend(googleLatLng);
}
google.maps.event.addDomListener(googleMap, 'bounds_changed', function() {
googleMap.setCenter(userPinLoc);
});
googleMap.fitBounds(bounds);
}