[OpenLayers-Users] Export features as json
Wally Atkins
wallyatkins at gmail.com
Thu Jun 14 05:24:47 PDT 2012
Try this openlayers json to write out your object ... That might get
you what you need:
http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Format/JSON-js.html
On Jun 14, 2012, at 8:16 AM, "Paul Meems (Top-X)" <p.meems at topx-group.nl> wrote:
> Hi,
>
> I have a website with a map showing a few vectors using WFS and the properties of those vectors in a table.
> I want give the user to opportunity to save the table as a PDF.
> To do this I want to convert the features to a json string and put that in a hidden form element and submit that form to a PHP file that will create the PDF.
>
> Of course I can loop through the features and create the json string manually, but I wonder if I can automatically export to features using something like:
> feature.toJSON().
>
> Of course I've used Google but the answers found talked about the other way round: JSON to features.
>
> Please advice.
>
> Thanks,
>
> Paul
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list