[Cartoweb-users] PHP in mapfile

Yves Bolognini yves.bolognini at camptocamp.com
Wed May 24 03:33:39 EDT 2006


Hello Yves,

OK I found something.

As I said PHP mapfiles are linked to auto layers. To generate at least
one true mapfile out of a PHP mapfile, you need to add a
"autoLayersIndexes" definition in your layers.ini. The minimal
definition is:

autoLayersIndexes = all

Please also verify that your mapId inside your project is also called
"script" (it means your path looks like
"../projects/script/server_conf/script/script.map.php").

Regards,
Yves


On mar, 2006-05-23 at 17:42 +0200, Jacolin Yves wrote:
> Hello,
> Sorry to not posting on the list (the reply button chose only the sender of 
> the mail :-( I will be take care of that.
> 
> So my project is called "script", the map name (inside the mapfile) is called 
> just 'map'.
> The includeFile function contained the doublequote (just forget in the 
> mail :-)
> 
> Regards,
> 
> Y.
> Le Mardi 23 Mai 2006 17:28, Yves Bolognini a écrit :
> > Est-ce que le mapId c'est bien "script" ?
> > Le mapfile doit impérativement s'appeler <mapId>.map.php.
> >
> > De plus, je pense qu'il manque des guillemets autour de postgis.php.
> >
> > Merci de répondre sur la mailing list si le problème est résolu.
> >
> > Salutations,
> > Yves
> >
> > On mar, 2006-05-23 at 17:09 +0200, Jacolin Yves wrote:
> > > Hello,
> > > I got a problem :-)
> > > I insert this in my script.map.php :
> > > <?php
> > >
> > > includeFile(postgis.php);
> > >
> > > ?>
> > >
> > > I run php-cgi scripts/makemaps.php
> > >
> > > no error message appears but I haven't got my auto.script.all.map file !
> > > rights are good :-)
> > >
> > > May be I missed something !??
> > >
> > > Y.
> > >
> > > Le Mardi 23 Mai 2006 16:43, Yves Bolognini a écrit :
> > > > Hi Yves,
> > > >
> > > > PHP mapfiles in CartoWeb are linked to the concept of "auto layers"
> > > > (see http://cartoweb.org/doc/cw3.2/xhtml/user.layers.html ).
> > > >
> > > > To do what you want, you will need to rename your mapfile with
> > > > extension .map.php instead of .map.
> > > >
> > > > Regards,
> > > > Yves B.
> > > >
> > > > On mar, 2006-05-23 at 15:46 +0200, Jacolin Yves wrote:
> > > > > Hello,
> > > > >
> > > > > I would like to create a kind of dynamic mapfile. I mean create a
> > > > > mapfile from a file tree and to add layers from a postgis DB.
> > > > >
> > > > > So one script create the mapfile (and the layers.ini and outline.ini
> > > > > files) and another one, create a file that contains LAYER
> > > > > informations from the postgis DB.
> > > > >
> > > > > Is it possible to put something like this in the first mapfile :
> > > > > <?php
> > > > > include (postgisLayer.php);
> > > > > ?>
> > > > > and then create the mapfile final using makemaps.phpat the end of my
> > > > > script ?
> > > > >
> > > > > Y.
> > > >
> > > > _______________________________________________
> > > > 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