[mapserver-users] How to add attributes to feature/shape with
max1000 at gmail.com
Mon Dec 6 12:41:27 EST 2010
I trying to add features to a layer with mapscript in a WFS server, there
isn't any method to set attributes directly to a feature or a shape.
I found initValues and setValue to set value to a shape object but in a
xml/gml response it doesn't appear. Anyone knows a way to do this?
// add feature
shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
lineObj line = new lineObj();
pointObj point = new pointObj(2.160690, 41.479881, 1);
System.out.println( shape.getValue(0) + " " + shape.getValue(1) + " " +
shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM );
line = new lineObj();
point = new pointObj(2.170000, 41.480000, 1);
Another workaround I found is generated a dbf file with all features and
attributes that I want and then load a mapfile pointing to this dbf file,
but this is inefficient.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-users