has create, or know how 1 might go creating openlayer map button check/uncheck overlays?
i have map several overlays, , make easier user able uncheck layers @ once.
thanks
call hidealloverlays
, showalloverlays
button callback.
// untested function setalloverlaysvisibility(map, status) { var layers = map.layers; (var = 0; i<layers.length; ++i) { var layer = layers[i]; if (!layer.isbaselayer) { layer.setvisiblity(status); } } } function hidealloverlays(map) { setalloverlaysvisibility(map, false); } function showalloverlays(map) { setalloverlaysvisibility(map, true); }
Comments
Post a Comment