[OpenLayers-Users] Properties of Vector Features to be printed Using MapFish Print
Jerome A. Wendell
jawendell at suddenlink.net
Sat Feb 15 07:41:03 PST 2014
Mark,
Thanks for your reply and suggestion. I will give that a try.
Jerome Wendell
Sent from Samsung Mobile
-------- Original message --------
From: Mark Prins <mc.prins at gmail.com>
Date: 02/15/2014 5:16 AM (GMT-05:00)
To: OpenLayers User List <openlayers-users at lists.osgeo.org>
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 <jawendell at suddenlink.net>:
> 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
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140215/0f24da37/attachment.html>
More information about the Users
mailing list