[Cartoweb-users] PHP in mapfile

Yves Bolognini yves.bolognini at camptocamp.com
Fri May 26 03:41:44 EDT 2006


Hello,

> First, where in the makemaps.php script the autoLayersIndexes is used ?

autoLayersIndexes define what indexes can be used for auto layers. For
instance, if you have autoLayersIndexes = toto and if mylayer is an auto
layer (generated by a printLayer call), you may have:

layers.root.children = mylayer_toto

but you can't have:

layers.root.children = mylayer_tutu

So to answer your question, autoLayersIndexes are used in makemaps.php
to verify that auto layers suffixes do exist. But you can also use PHP
mapfiles without using autoLayersIndexes.

> And is it possible to create a postgis.php file like this :
> LAYER
>   NAME $postgis["name"]

Well, not like this, but you can do something like:

<?php $postgis = array("name" => "blah blah"); ?>
LAYER
  NAME <?php print $postgis["name"]; ?>

Regards,
Yves




More information about the Cartoweb-users mailing list