[Cartoweb-users] retrieve layers for the mapfile

Oliver Christen oliver.christen at camptocamp.com
Mon Jul 17 04:39:29 EDT 2006


you can access the mapfile object from server side with $msMapObj = 
$this->serverContext->getMapObj();
then access all mapfile object via phpmapscript methodes and properties ( 
http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/referencemanual-all-pages )
in your case you may be interesssed by getLayer(int index) or 
getAllLayerNames() with getLayerByName(string layer_name)
you can have a look at the server side file of the outline plugin for some 
exemple of usage

Regards
Oliver

----- Original Message ----- 
From: "Jacolin Yves" <yjacolin at free.fr>
To: <cartoweb-users at lists.maptools.org>
Sent: Monday, July 17, 2006 10:24 AM
Subject: [Cartoweb-users] retrieve layers for the mapfile


> Hi,
> How can I retrieve layers info from the mapfile ? I need to know two kind 
> of
> information : the name of the layers and connection type/DATA.
>
> Possiblity, to get all informations of the mapfile in an array :-)
>
> Thanks,
>
> Y.
> -- 
> Yves Jacolin
> http://yjacolin.gloobe.org
> ----
> Stagaire Conservatoire Régional des Espaces Naturels de la région Centre
> http://cahiersnaturalistes.free.fr/cpnrc/
> ----
> - Qu'est-ce que cela peut faire que je lutte pour la mauvaise cause
> puisque je suis de bonne foi?
> - Et qu'est-ce que ça peut faire que je sois de mauvaise foi
> puisque c'est pour la bonne cause. (Jacques Prévert)
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list