<div>Hi,<br><br>I would like to have a custom layer (different from the baselayer) and a custom projection (same as the base layer of course) in my overviewmap:<br><br>I've tried this:<br><br>//baselayer based on tilecache<br>
baseLayer = new OpenLayers.Layer.WMS ( "Carte de base",<br> ["<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://osl1/tilecache/tilecache.py" target="_blank">http://osl1/tilecache/tilecache.py</a>?",<br>
"<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://osl2/tilecache/tilecache.py" target="_blank">http://osl2/tilecache/tilecache.py</a>?",<br>
"<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://osl3/tilecache/tilecache.py" target="_blank">http://osl3/tilecache/tilecache.py</a>?",<br>
"<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://osl4/tilecache/tilecache.py" target="_blank">http://osl4/tilecache/tilecache.py</a>?"<br>
],<br> { layers : "siglight3",<br> map_projection: "init=epsg:42105",<br>
transparent: "true" },<br> { isBaseLayer: true }<br> );<br><br>
//WMS layer for the overview<br>var wms_ov = new OpenLayers.Layer.WMS ( "overview",<br> "http:/...",<br> { layers : "muncp",<br>
map_projection: "init=epsg:42105",<br> transparent: "true",<br> format: "gif"<br>
},<br> { isBaseLayer: false, singleTile: true }<br> );<br>//options for the ov<br>var ov_options = {layers: [wms_ov],<br>
maxExtent: new OpenLayers.Bounds(30000, 75000, 1709360, 2120440),<br> projection:"EPSG:42105",<br> units: "m"<br> };<br><br>//adding the control<br>
var overview = new OpenLayers.Control.OverviewMap( {mapOptions: ov_options} );<br> map.addControl(overview); <br><br>With this configuration, I still have a popup message you tell me that the projection of the ov must be equal to the one in the baselayer (which I do). <br>
And, If a check the call made by openlayers for the ov, the SRS seem to be 4326 (why?) and the bounding box is in lat/lon (Why?)<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mdrim00-000251/MapServer5/mapserv.exe?MAP=overview.map&LAYERS=direction_territoriale&MAP_PROJECTION=init%3Depsg%3A42105&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,332,422&WIDTH=256&HEIGHT=256" target="_blank">http://mdrim00-000251/MapServer5/mapserv.exe?MAP=overview.map&LAYERS=direction_territoriale&MAP_PROJECTION=init%3Depsg%3A42105&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,332,422&WIDTH=256&HEIGHT=256</a><br>
</div>
<div>any advice on this?<br><br>MartinO<br> </div>