[ka-Map-users] keeping only one layers on
Paul Spencer
pspencer at dmsolutions.ca
Tue Jul 18 14:57:51 EDT 2006
You would need to do this programmatically in javascript and provide
your own user-interface for doing this.
The critical part of the code would look something like:
function turnLayerOn(name) {
var map = myKaMap.getCurrentMap();
var layers = map.getAllLayers();
for (var i=0; i<layers.length; i++) {
layers[i].setVisibility(layers[i].name == name);
}
}
and in your HTML, you would have controls (buttons, select etc) that
would call turnLayerOn with the name of the layer to turn on.
Cheers
Paul
On 17-Jul-06, at 12:05 PM, Shahidul Islam wrote:
> Hi list
>
> how can i keep only one layer on leaving all other layers off. For
> example, initially layer X is on, now if i want to turn layer Y on
> then layer X will be off automatically meaning that i want to keep
> always only one layer on at a time. Any suggestions?
>
> Regards
>
> Shahidul
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the ka-Map-users
mailing list