Mark, Thanks for your reply and suggestion. I will give that a try.
Jerome Wendell Sent from Samsung Mobile -------- Original message -------- From: Mark Prins <[email protected]> Date: 02/15/2014 5:16 AM (GMT-05:00) To: OpenLayers User List <[email protected]> Subject: Re: [OpenLayers-Users] Properties of Vector Features to be printed Using MapFish Print 2014-02-14 23:07 GMT+01:00 Jerome A. Wendell <[email protected]>: > I basically have the spec to print my map with the desired layers, except > for one property that I have not been able to include in the geojson string > for the features. I am using OpenLayers Version 2.12. The spec is as > > I have highlighted the property that I need to include in the spec. I have > tried to add it to the geoJson representing the feature by using the > following code: > > > > var featureFormat = new OpenLayers.Format.GeoJSON(); > > var featureGeoJson = featureFormat.write.call( > > featureFormat, feature); > > featureGeoJson.properties = OpenLayers.Util.extend({ > > _gx_style: 1 > > },featureGeoJson.properties); > I'd try extending/modifying the feature before serializing to json, something like: ``` feature.data._gx_style = 1; var featureGeoJson = featureFormat.write.call(featureFormat, feature); ``` -- Disclaimer; This message is just a reflection of what I thought at the time of sending. The message may contain information that is not intended for you or that you don't understand. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
