How persist an Polygon or Line in JSF app
I'm trying persist an Polygon or multipolygon in JSF application. The database model, classes POJO has been OK, but in JSF/HTML forms, i dont know how proceed to submit an polygon or line string to my Java application.
To persist an openlayers Point i create an javascript action to send the XY to html inputs and after i submit to my java application.
In resume, i want now to make the HTML/JSF and Javascript code to can persist this features or yet an 开发者_如何学Ctutorial to help me.
Java model/pojo - ok OpenLayers - ok JSF and javascript proceedments - i dont know the 'way'
From now appreciate the support.
For persisting polygons or other vector shapes, you need to serialize them to a vector format (e.g. GeoJSON, KML) first, then you can send the serialized string to the server and process/save it further.
Luckily, OpenLayers supports many popular vector formats out of the box - check the vector formats example for further instructions.
精彩评论