[OpenLayers-Users] setting tiling resolutions after openlayers map is created

Boy de Wit boy at b3partners.nl
Thu Apr 5 04:36:07 EDT 2012


Hi users,

I am currently using OpenLayers with some tiling layers and setting the resolutions
on creation of the map with options parameter like so:

var opt = {
            projection: new OpenLayers.Projection("EPSG:28992"),
            maxExtent: maxBounds,
            resolutions: olRes,
            allOverlays: true,
            units : 'm',            
            controls : [new OpenLayers.Control.Navigation({
                    zoomBoxEnabled: false
                }),new OpenLayers.Control.ArgParser()]
        };

I was wondering if it possible to set the resolutions again after the map is created. I want to do some calculations
to remove some of the previous resolutions or when the screen is resized. But it does not work when I set
the resolutions again on the map like so:

mapObject.resolutions = olRes;
mapObject.resolution = 215.04;

Can I alter the resolutions on the map after creation?

Kind regards,

Boy de Wit
B3Partners BV
Tel: +31 030 214 20 81
http://www.b3partners.nl | http://twitter.com/boydewit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120405/52aa4fee/attachment.html


More information about the Users mailing list