Hello list,<br><br>I have several data time series associated with geographic coordinates (points). I would like to display these values in the right locations according to user selection of a) what data they would like to see, and b) for which period. Of course, if it was just a few datasets and only one period, I could just statically add some attribute columns to a point shapefile and use a label to display, but it needs to be more dynamic than that,
i.e. the labels must be created and displayed on the fly, with the values coming from another database table.<br><br>I would be very grateful for any pointers to how to best approach this, whether by extending some existing features of CartoWeb, or "from scratch" in a plugin using PHP mapscript.
<br><br>Should I create a shapefile object, or use the coordinates to add inline features to a (new or existing) layer? <br><br>My first thoughts were along the following lines, but I'm not getting it to display, and not sure how to proceed.
<br><br>$msMapObj = $this->serverContext->getMapObj();<br>$pointLayer = ms_newLayerObj($msMapObj);<br>$pointLayer ->set('type', MS_LAYER_POINT); <br>// get $x and $y and the $value for this point <br>$newPoint = ms_shapeObjFromWkt("POINT ($x $y)");
<br>$newPoint->set("text","$value"); <br>$pointLayer->addFeature($newPoint);<br><br>$msClass = ms_newClassObj($pointLayer); <br>$msClass->label->set("type", "TRUETYPE");
<br>$msClass->label->set("font", "Vera");<br>$msClass->label->set("size", 6);<br>$msClass->label->color->setRGB(0,0,0);<br><br>Thanks for any suggestions,<br>Knut<br><br>