Hi Chris,
> With a full HTML example, probably someone could.
>
> Regards,
>   
this is my code:

<html>
<head><title>demo 02</title>
<script src="OpenLayers-2.6/OpenLayers.js" type="text/javascript"></script>
<script scr="proj4js/lib/proj4js.js" type="text/javascript"></script>
<script scr="proj4js/lib/defs/EPSG32633.js" type="text/javascript"></script>
<script scr="proj4js/lib/defs/EPSG4326.js" type="text/javascript"></script>
<script type="text/javascript">

        var map;

        //Evita le mattonelle rosa in caso di errore
        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
        OpenLayers.Util.onImageLoadErrorColor = "transparent";
        
        function init(){

                var bounds  =  new OpenLayers.Bounds(
                        397456.60396, 4628729.82949,
                        444234.89031, 4682524.85879
                        ); //minX,minY,maxX,maxY values

                var options = { 
                        //controls: [],
                        restrictedExtent:bounds,
                        maxExtent:bounds,
                        maxResolution: 'auto',
                        projection: "EPSG:32633",
                        units:'m',
                }

                map = new OpenLayers.Map('map', options);


                        var maj_limit = new OpenLayers.Layer.WMS("Confine 
PNM","http://gisst.eu/cgi-bin/wms_serv?";,
                                {
                                        layers:'PNMajella_01',
                                        srs:'EPSG:32633',
                                        format:'image/gif',
                                        transparent:'true'
                                }
                        );
                        map.addLayer(maj_limit);

                
                map.zoomToExtent(bounds);
                
                mp = new OpenLayers.Control.MousePosition({div: $('coord02')});
                mp.displayProjection = new OpenLayers.Projection("EPSG:4326");
                map.addControl(mp);


        
                map.addControl( new OpenLayers.Control.KeyboardDefaults());
                //map.addControl( new OpenLayers.Control.LayerSwitcher() );
                map.addControl( new OpenLayers.Control.MousePosition ({div: 
$('coord01')}) );
                //map.addControl( new OpenLayers.Control.MousePosition ({div: 
$('coord02')}) );
                map.addControl(new OpenLayers.Control.Navigation());
}

</script>
</head>
<body onload="init();">
        <div id="container">

                <div id="map">
                </div>
                <div id="coord01">
                </div>
                <div id="coord02">
                </div>
        </div> 
</body>
</html>


_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to