[OpenLayers-Users] minScale maxScale doesn't work
Eric Lemoine
eric.lemoine at camptocamp.com
Mon Jan 23 01:26:30 EST 2012
On Saturday, January 21, 2012, vrbikdan <vrbikdan at gmail.com> wrote:
> Hi,
> I'm trying to set min and max scale for layer. I used this part of code:
>
> kontiky_layer = new OpenLayers.Layer.GML("GML",
> "kontikyVrstva/kontikyFinalGML.gml", {projection: map.displayProjection,
> styleMap: styleKontiky},{minScale: 60000, maxScale: 10000})
>
> But unfortunately layer is still visible in all scales.
What if you set minScale and maxScale in the same object as where
projection and styleMap are set?
Note: Layer.GML is deprecated, you should use a Vector layet configured
with a Fixed strategy and an HTTP protocol. Look at the OpenLayers example.
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120123/249da3ab/attachment.html
More information about the Users
mailing list