Hi Steve,
I am using the java SWIG api. Layer=new layerObj(map); layer.setStatus(MapServerConstants.MS_ON); layer.setType(MS_LAYER_TYPE.MS_LAYER_POLYGON); layer.setConnectiontype(MS_CONNECTION_TYPE.MS_INLINE); shapeObj shape = GeometryProxy.createObjGeometry(g.getGeometry());// creating the shapeObj Object classObj co = SymbolProxy.createFillSymbol(map, g.getSymbol());// creating the classObj Object shape.setClassindex(layer.insertClass(co, -1)); layer.addFeature(shape); I found out another method using attributes Layer=new layerObj(map); layer.setStatus(MapServerConstants.MS_ON); layer.setProcessing(“ITEMS=index”); layer.setClassItem(“index”); layer.setType(MS_LAYER_TYPE.MS_LAYER_POLYGON); layer.setConnectiontype(MS_CONNECTION_TYPE.MS_INLINE); shapeObj shape = GeometryProxy.createObjGeometry(g.getGeometry());// creating the shapeObj Object classObj co = SymbolProxy.createFillSymbol(map, g.getSymbol());// creating the classObj Object shape.initValues(1); index=layer.insertClass(co, -1); layer.getClass(index).setExpression(Integer.toString(index)); shape.setValue(0, Integer.toString(index) ); layer.addFeature(shape); I add more data but I do not think performances will much suffer I wonder if there is a better solution. Meher
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
