[OpenLayers-Users] serialize feature style to geojson

greendorf-2 aardelean at mybiosis.info
Thu Nov 17 06:49:41 EST 2011


Hi,

I am drawing polygons using the control and then edit the style of these new
polygons. Is there a way to serialize the style of vector newly created
features to a geojson file?

I change the style of newly created polygons with: 

/activefeature.style = { stylename : stylevalue}; 
vectors.drawFeature(activefeature);/

and then I obtain the feature geojson with 

/var type = "geojson";
var pretty = true; 
var str = formats['out'][type].write(e.feature, pretty);/

The geojson structure however does not contain any style properties. Is
there an option I can use for including feature style?  

cheers,
Adorian
        



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/serialize-feature-style-to-geojson-tp7003824p7003824.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list