From 363f837acb0d005a036bebbe4278da2835ca1c82 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 19 Apr 2012 13:29:56 +0200 Subject: [PATCH] Using resolution instead of zoom level for initial center (see #418). --- examples/bing-tiles.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/bing-tiles.js b/examples/bing-tiles.js index 0d4546bd09..e99c589656 100644 --- a/examples/bing-tiles.js +++ b/examples/bing-tiles.js @@ -23,7 +23,9 @@ var hybrid = new OpenLayers.Layer.Bing({ map.addLayers([road, aerial, hybrid]); map.addControl(new OpenLayers.Control.LayerSwitcher()); +// Zoom level numbering depends on metadata from Bing, which is not yet loaded. +var zoom = map.getZoomForResolution(76.43702827453613); map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject() -), 11); +), zoom);