[Cartoweb-users] Changing selected layers in code

Alessandro Muzzetta a.muzzetta at i4es.it
Tue Jan 22 19:25:29 EST 2008


Hello,

is it possible to change the layers that are activated by default directly
in code instead of having to change the layers.ini file?

I have several dozen layers of which only two will be active at any given
time.  Deciding which two layers will be displayed is going to be decided by
an algorithm written in php, not by the user.  At every page refresh, the
algorithm, based on several parameters, will set just two layers to
selected.
Is there a way to do this within Cartoweb in php?

The only ugly solution I have thought of so far is to overwrite the
layers.ini file with a new one and having the pertinent layers marked as
selected.  However, aside being ugly, this runs into problems with caching.

Any help would be appreciated.

Thanks

-- 
Alessandro Muzzetta
IES Solutions Srl
Catania Office
Via Vulcano 10 - I-95030 Gravina di Catania, Italy
Email: a.muzzetta at i4es.it
Phone/Fax: +39 095211640
Skype: alex-tecnia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080123/8aed857c/attachment.html


More information about the Cartoweb-users mailing list