Fabian,<div>I have successfully used this code with Java mapscript to add features to a layer at runtime:</div><div><br></div><div><div>    protected void addShapeToMap(shapeObj s) {</div><div>        layerObj bufferLayer = map.getLayerByName("GEOS");</div>
<div><br></div><div>        bufferLayer.addFeature(s);</div><div>        bufferLayer.setStatus(mapscriptConstants.MS_DEFAULT);</div><div>        bufferLayer.setDebug(mapscriptConstants.MS_ON);</div><div>    }</div></div><div>
<br></div><div>The GEOS layer was defined as follows:</div><div><br></div><div><div>        LAYER</div><div>                NAME "GEOS"</div><div>                TYPE POLYGON</div><div>                STATUS ON</div>
<div><br></div><div>                TRANSPARENCY 50</div><div><br></div><div>                CLASS</div><div>                        NAME "geos"</div><div>                        STYLE</div><div>                                COLOR 0 254 0</div>
<div>                                SIZE 2</div><div>                        END</div><div>                END</div><div>        END</div></div><div><br></div><div>HTH,</div><div>Umberto</div><div><br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Dec 10, 2012 at 11:24 AM, Fabian Schindler <span dir="ltr"><<a href="mailto:fabian.schindler@eox.at" target="_blank">fabian.schindler@eox.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi devs,<br>
<br>
In our application we use MapScript to configure a WMS service to service satellite imagery. One feature is to display the outlines of the images using a vector layer. We are currently doing this using an SQL connection to the database.<br>

<br>
We found this prone to errors as the query also involved a time span which is not time zone aware. Also, we use Djangos ORM to set up our database layout, so we have to apply changes to the custom query SQL every time the data models receive changes.<br>

<br>
So I'm looking for alternatives and I found the FEATURE object would suit our needs, as we already have retrieved the geometry from the database, which we could serialize as WKT. Unfortunately, I could not find any `featureObj` or the like in MapScript and the `layerObj` does not have a `feature` property.<br>

<br>
Do I miss something here? Is there another possibility to easily pass geometry too a `layerObj` without relying on files on the disk or a database connection?<br>
<br>
Thanks,<br>
Fabian<br>
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br>
</blockquote></div><br></div>