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