Hello guys...<br>I have an application with Bing base layer with some WMS overlay ....<br>Thats working fine :<br><br> map = new OpenLayers.Map('MapTest', { <br> units: "m", <br> projection:new OpenLayers.Projection("EPSG:900913"),<br>
displayProjection: new OpenLayers.Projection("EPSG:4326"),<br> tileSize: new OpenLayers.Size(400, 400), <br> numZoomLevels: 10, <br> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)<br>
}); <br><br> var bing = new OpenLayers.Layer.VirtualEarth("Aerial", {<br> type: VEMapStyle.Aerial, numZoomLevels: 10,sphericalMercator: true,maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)<br>
});<br><br>var wmsLayer = new OpenLayers.Layer.WMS("TestWmsLayer",<br> _mapfile, {<br> "LAYERS": ['Points'],<br> transparent: true, <br>
format: "image/png"<br> }, {<br> isBaseLayer: false,<br> visibility: true <br> }); <br> <br><br>
Now I create another base layer (WMS):<br><br>var wmsBaseLayer = new OpenLayers.Layer.WMS("TestWmsBaseLayer",<br>
_mapfile, {<br>
"LAYERS": ['WmsBaseLayer'],<br>
transparent: true, <br>
format: "image/png"<br>
}, {<br>
isBaseLayer: true,<br>
visibility: true <br>
}); <br><br><br>The problem when I switch between bing base layer and wmsBaseLayer, my map appear in completely other location... How can I fix that? <br><br>Thanks<br>