[OpenLayers-Users] OpenLayers.Feature.Vector to json
Arnd Wippermann
arnd.wippermann at web.de
Wed Nov 14 12:57:39 PST 2012
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: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von
islanis at infomed.sld.cu
Gesendet: Mittwoch, 14. November 2012 16:27
An: openlayers-users at lists.osgeo.org
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
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list