Google Maps dinámico con mosaicos personalizados evita que se repita el movimiento.

Tengo un conjunto de mosaicos dinámico en el que NO quiero permitir el desplazamiento fuera de sus límites.

El siguiente código me acerca, pero el usuario todavía puede desplazarse horizontalmente fuera de los límites estrictos porque usa el centro del mapa para la comparación

var strictBounds = new google.maps.LatLngBounds(
 new google.maps.LatLng(sw_lat, sw_lon), 
 new google.maps.LatLng(ne_lat, ne_lon)
);

google.maps.event.addListener(map, 'drag', function() 
{
  if (strictBounds.contains(map.getCenter())) return;

 // We're out of bounds - Move the map back within the bounds

 var c = map.getCenter(),
     x = c.lng(),
     y = c.lat(),
     maxX = strictBounds.getNorthEast().lng(),
     maxY = strictBounds.getNorthEast().lat(),
     minX = strictBounds.getSouthWest().lng(),
     minY = strictBounds.getSouthWest().lat();

 if (x < minX) x = minX;
 if (x > maxX) x = maxX;
 if (y < minY) y = minY;
 if (y > maxY) y = maxY;

 map.setCenter(new google.maps.LatLng(y, x));
});

Respuestas a la pregunta(3)

Su respuesta a la pregunta