Ticket #2759 (closed bug: fixed)
allOverlays trouble with Google v3 layer
| Reported by: | tschaub | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.10 Release |
| Component: | Layer.SphericalMercator | Version: | 2.9 |
| Keywords: | Cc: | ||
| State: | Complete |
Description
If you create a map with allOverlays true and add a Google v3 layer as the first layer to the map, when you set the visibility of that layer to false, you cannot pan the map.
This simple example demonstrates the issue:
var map;
function init() {
map = new OpenLayers.Map('map', {allOverlays: true});
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gmap = new OpenLayers.Layer.Google(
"Google Streets", // the default
{numZoomLevels: 20, visibility: false}
);
var osm = new OpenLayers.Layer.OSM();
map.addLayers([gmap, osm]);
map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
), 5);
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

