[OpenLayers-Users] problems with restrictedExtent

Vito Tafuni vitotafuni at gmail.com
Wed Jun 9 06:59:09 EDT 2010


i'm using this options to display a google layer and a vector one

     var options = {
                  projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "km",
                maxScale: 55468034.09051751,
                maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                restrictedExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                controls:[
                    new OpenLayers.Control.Navigation({
                        documentDrag: true,
                        handleRightClicks:true
                        //,mouseWheelOptions: {interval: 100}
                    }),
                    new OpenLayers.Control.KeyboardDefaults(),
                    new OpenLayers.Control.Scale()
                ]
            };

the restrictedExtent works for panning but zooming is not restricted!
on the examples page if found that " You can either set the scale or the
resolution, there is no need to set both. "
so i've put the right maxScale parameter but i can zoom out more and more

any solutions??


Vito


--
-----------
Tafuni Vito
vito at vitotafuni.com
---------------------------------------------
"Verba volant, scripta manent... data corrupted"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100609/f2e5a4a2/attachment.html


More information about the Users mailing list