OpenLayers offers

OpenLayers.Format.GeoJSON
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLay
ers/Format/GeoJSON-js.html
http://openlayers.org/dev/examples/vector-formats.html

to serialize features to geoJSON

and

OpenLayers.Format.JSON
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLay
ers/Format/JSON-js.html
 
to serialize objects into JSON

Arnd


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von
[email protected]
Gesendet: Mittwoch, 14. November 2012 16:27
An: [email protected]
Betreff: [OpenLayers-Users] OpenLayers.Feature.Vector to json

Hi people, exist the posibility of convert the data or attributes fields of
"OpenLayers.Feature.Vector" to "json" cause i need it to work and i dont
know a way to solve that, or retrieve the columns or fields value of the
data or attributes fields, for example these is what i get with firebug

Object { cpopular="xcvx", empresa="vxcvxc",
nombre="cvxcv",cantidad="xcvxcv",func="xcvxcv",ubicacion= "xcvxcv"}

cantidad "xcvxcv"
cpopular "xcvx"
empresa "vxcvxc"
func "xcvxcv"
nombre "cvxcv"
ubicacion "xcvxcv"


i need to convert it to json i means to this:

  { "cpopular":"xcvx", "empresa":"vxcvxc",
"nombre":"cvxcv","cantidad":"xcvxcv","func":"xcvxcv","ubicacion":  
"xcvxcv"}

or get the fields in form of array to convert my self to json cause i cant
get the column values i mean:

[cantidad,
cpopular,
empresa,
func,
nombre,
ubicacion]

thanks to all you

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


--

Este mensaje le ha llegado mediante el servicio de correo electronico que
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
Nacional de Salud. La persona que envia este correo asume el compromiso de
usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/
_______________________________________________
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

Reply via email to