Yes this is it !!

i presumed about Scale instead
thanks for your help

tonton


On Thu, May 6, 2010 at 2:55 PM, <manel.c...@ajgirona.cat> wrote:

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

Reply via email to