Vous vous demandez si quelqu'un pourrait fournir un exemple de configuration des extensions maximale et minimale à l'aide de GMaps2? Dans OpenLayers, voici comment cela est fait:Définition des limites maximales et minimales à l'aide de l'API Google Maps
var point1 = new OpenLayers.Geometry.Point(7, 48);
point1.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
var point2 = new OpenLayers.Geometry.Point(11, 54);
point2.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
var bounds = new OpenLayers.Bounds();
bounds.extend(point1);
bounds.extend(point2);
bounds.toBBOX();
map = new OpenLayers.Map("map", {
maxExtent: bounds,
maxResolution:"auto",
maxZoomLevel: 8,
projection:"EPSG:900913",
controls: []
});
map.addLayer(new OpenLayers.Layer.OSM.Osmarender("Osmarender"));
map.zoomToMaxExtent();
//map.zoomToExtent(bounds);
Quel serait l'équivalent de GMaps2?
Qu'entendez-vous exactement par étendue? Voulez-vous conserver la vue dans une certaine région? Ou restreindre les niveaux de zoom possibles? –