On Saturday, January 21, 2012, vrbikdan <[email protected]> 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 : [email protected] http://www.camptocamp.com
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
