<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="2" face="Arial">HI,<br>
<br>
I'm trying to create a layer to insert into a map. I have shapes
in WKT and am trying to insert them into a layer and draw it to a
pdf.<br>
<br>
It works fine if I only have one class for the shapes. I am trying
to add several classes to the layer to draw in different colors. I
cannot get the shapes to use the proper class.<br>
<br>
Here is what I'm doing.<br>
<br>
After creating a layer and adding all the classes, I add the
shapes.<br>
</font>
<blockquote><font face="monospace">for (i = 0, ii =
count($features); $i < $ii; i++) {</font><br>
<font face="monospace"> $shape = ms_shhapeObjFrom
Wkt($features[$i]->geometry);</font><br>
<font face="monospace"> $shape->set('classindex',
$features[$i]->classindex);</font><br>
<font face="monospace"> $success =
$layer->addFeature($shape);</font><br>
<font face="monospace">}</font><br>
</blockquote>
<font size="2" face="Arial">The shapes draw but all use $class[0].<br>
<br>
If I add this line in before the draw,<br>
<br>
$layer-moveclassup(1);<br>
<br>
all the shapes are drawn with that class.<br>
<br>
I have been able to verify that the classes exist in the layerObj
and that the classindex in the shapeObj points to the proper
class.<br>
<br>
Does anyone have any ideas why the drawing code is not using the
classindex to draw these shapes in different colors?<br>
<br>
What am I doing wrong?<br>
<br>
</font>
<div class="moz-signature">-- <br>
<b>Worth Lutz</b><br>
<br>
<br>
</div>
</body>
</html>