How to create TEMPLATE dynamically under php

CATHIGNOL, Frederic Frederic.CATHIGNOL at astrium-space.com
Fri Nov 9 06:32:39 PST 2001


Hello from France;

I certainly miss something, but I would like to transform this .MAP code in
PHP :
LAYER
  NAME xx
  METADATA
    "DESCRIPTION"   "xx"
    "RESULT_FIELDS" "NAME"
  END
  TYPE POLYGON
  STATUS OFF
  DATA xx
  CLASS
    NAME "xx"
    COLOR 200 255 0
    OUTLINECOLOR 120 120 120
    TEMPLATE "ttt_query.html"
  END
  TOLERANCE 5
END # Layer

I do not know how to create the TEMPLATE line. How do you do that ? 

I tried the code here after, but I block on the template tag :
$layer = ms_newLayerObj($gpoMap);
$layer->set("name","xx");
$layer->set("type", MS_LAYER_POLYGON);                     
$layer->set("data", "xx");
$layer->set("status", MS_ON);
$layer->setMetaData("DESCRIPTION","xx");
$layer->setMetaData("RESULT_FIELDS","NAME");
$fredclass = ms_newClassObj($layer);
$fredclass->set("name","xx");
$fredclass->set("color",2);      
$fredclass->set("outlinecolor",2);      

Thanks Guys for your help to a french developper !
(frederic.cathignol at bigfoot.com)

Best regards,

F.CATHIGNOL




More information about the MapServer-users mailing list