hello this is my testpage <br>the Zoom is not at the boundings i think to set but a part of it! <br>So i can not see my map in once zoom - neither work :o( ?? <br>the extent i see seems to be (842943, 2334894, 843837, 2335562)<br>
<br> <html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br> <head><br> <link rel="stylesheet" href="style.css" type="text/css" /><br>
<script src="openlayers/lib/Firebug/firebug.js"></script><br> <script src="openlayers/lib/OpenLayers.js"></script><br> <script type="text/javascript"><br>
<br> var map = null;<br> function init(){<br> var bounds = new OpenLayers.Bounds(<br> <b> 842121.69, 2334085.77, 844655.91, 2336372.63</b><br> );<br>
//var size = new OpenLayers.size(w:800 h:600); (not workà<br> var options = {<br> maxExtent: bounds,<br> projection: "EPSG:27572",<br> units: 'm',<br>
};<br><br> map = new OpenLayers.Map('map',options);<br><br> var wms0 = new OpenLayers.Layer.WMS(<br> "Parcelles Edigeo",<br> "<a href="http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&">http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&</a>",<br>
{layers: 'Parcelles',transparent: "true"},<br> {buffer: 1, isBaseLayer: true},<br> {noMagic: 'true'}<br> );<br><br> var wms1 = new OpenLayers.Layer.WMS(<br>
"Axe Edigeo",<br> "<a href="http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&">http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&</a>",<br>
{layers: 'Axe',transparent:"true"},<br> {isBaseLayer:false},<br> {noMagic: 'true'}<br> );<br><br> var wms2 = new OpenLayers.Layer.WMS(<br>
"Ilots",<br> "<a href="http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&">http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&</a>",<br> {layers: 'Ilots',transparent: "true"},<br>
{isBaseLayer:false},<br> {noMagic: 'true'}<br> );<br><br> var wms3 = new OpenLayers.Layer.WMS(<br> "LabelParcelle Edigeo",<br>
"<a href="http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&">http://geomap/cgi-bin/mapserv?map=/var/www/geomod/test.map&</a>",<br> {layers: 'LabelParcelle',transparent: "true"},<br>
{isBaseLayer:false},<br> {noMagic: 'true'}<br> );<br><br> map.addLayers([wms0]);<br> map.addLayers([wms2]);<br> map.addLayers([wms1]);<br>
map.addLayers([wms3]);<br><br>//ajout l'overview<br> var overview = new OpenLayers.Control.OverviewMap({layer:[wms0]});<br> map.addControl(overview);<br><br>//Ajout le layer switcher<br>
<br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br><br>//Ajout la position de la souris dans la div mouseposition<br> map.addControl (new OpenLayers.Control.MousePosition({<br> div: document.getElementById("mouseposition")<br>
}));<br>// Zoom Max Extent Marche pas identique a ZoomExtent<br><br> <b> map.zoomToMaxExtent();</b><br><br> //ajout un Point sur la Carte<br> var markersLayer = new OpenLayers.Layer.Markers("Un Point ");<br>
var iconSize = new OpenLayers.Size(20,20);<br> var iconOffset = new OpenLayers.Pixel(-(iconSize.w/2), -iconSize.h);<br> var marker = new OpenLayers.Marker(<br> //new OpenLayers.LonLat('5,591','47,97'),<br>
new OpenLayers.LonLat('842955.67500',' 2335123.73125'),<br> new OpenLayers.Icon('img/icons/point.png',iconSize,iconOffset)<br> );<br> markersLayer.setVisibility(true);<br>
markersLayer.addMarker(marker);<br> map.addLayer(markersLayer);<br> }<br><br> </script><br> </head><br><br> <body onload="init()"><br> <div id="map" style="width: 640px; height: 480px"></div><br>
<br/><div id="mouseposition"></div><br>