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

kaka drspencer at hotmail.com
Wed May 2 17:42:40 EDT 2007


Hi again
I recently got help on this forum on how to show/hide a marker layer based
on zoom level. Now, I am trying to do the same with a GML layer that I
recently added to the map. I am not sure of how to add the min/maxResolution
to the second line below, the map stops rendering when I add the command. I
thought that it would be more or less the same as in the first line, but I
must be missing something.

--------
var MarkersLayer2 = new OpenLayers.Layer.Text( "Region info", {location:
"RegionLocations.txt", minResolution: 0.002, maxResolution: 0.02});

map.addLayer(new OpenLayers.Layer.GML("Regions", "gml/output.gml"));
--------

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.

Magnus
-- 
View this message in context: http://www.nabble.com/Turning-on-off-a-GML-layber-depending-on-zoom-level-tf3683443.html#a10295350
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list