problems with ms_newClassObj

Dieter Lehmann lehmann at fh-nuertingen.de
Mon Jan 15 11:05:01 EST 2001


Hi there,
I get stuck using mapscript/php3. With my attached code I get an "document
contains no data".
Think, something is wrong with the Class-definition.
(using only the map-file without the definitions of a class everything is o.k.).

Could someone help me?

Thanks !

Dieter

----------------snip----------

$map = ms_newMapObj("ex1.map");

$poLayer = $map->getLayer(0);

$nColorId =$map->addColor(244, 0, 0);
$poClass = ms_newClassObj($poLayer);

$poClass->set("name",testo);
$poClass->set("color",255, 0, 0);
$poClass->set("outlinecolor",255,0,0);

$img = $map->draw();
$url = $img->saveWebImage(0, 0);
printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width, $map->height);



----- and here the map-file ex1.map------


LAYER 
  NAME "test2" 
  DATA gmd
  STATUS DEFAULT
  TYPE POLYGON 
END 

END 




-- 
___________________________________

Dieter Lehmann 
University of applied Sciences
Schelmenwasen 4-8
D-72622 Nuertingen, Germany
lehmann at fh-nuertingen.de
Phone: +49 (0) 7022 404 Ext. 192 or Ext. 152
Fax: +49 (0) 7022 404 Ext. 166



More information about the mapserver-users mailing list