[OpenLayers-Users] Turning on/off a GML layber depending on zoom level

Christopher Schmidt crschmidt at metacarta.com
Wed May 2 17:50:22 EDT 2007


On Wed, May 02, 2007 at 02:42:40PM -0700, kaka wrote:
> See http://www.villageografica.com//test47/Africa-test.html for the current
> version. I would like to remove the layer "Regioner" as the user zooms in.
> Any ideas warmly welcome.

map.addLayer(new OpenLayers.Layer.GML("Regions", "gml/output.gml",
{'minResolution': 0.002, maxResolution: 0.02}));

Seems to work for me. (Can't test, cause I don't have the data locally,
but the layer selector makes it look like it will.)

if you can set this up, and it errors, I'd be interested in seeing any
error message you get.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list