Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-10 Thread Robert Sanson
Thanks Atle - this is what is working for me from the returned JSON: var myObject = JSON.parse(response.responseText); //JSON.parse is a parser based on json2.js var x_nztm = (+myObject.results[0].attributes.x_nztm); var y_nztm = (+myObject.results[0].attributes.y_nztm); var mggeom = new OpenLay

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-08 Thread Hugo
Thanks a lot for all the inputs you have given. In fact with GeoJSON everything goes smoothly. Cheers, Hugo On Mon, Mar 8, 2010 at 7:20 PM, Eric Lemoine wrote: > On Saturday, March 6, 2010, Hugo wrote: > > Hello all, > > > > I'm trying to create a vector layer based on a php query (which includ

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-08 Thread Eric Lemoine
On Saturday, March 6, 2010, Hugo wrote: > Hello all, > > I'm trying to create a vector layer based on a php query (which includes > the_geom) encoded in JSON. Until the moment i haven't been able to achieve > this. > Following, is the relevant part of the code: > > var connect = new Ext.data.Con

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-08 Thread Sveen Atle Frenvik (Geomatikk IKT)
try" : >>{ >> "x" : 1492934.61, >> "y" : 5131545.29, >> "spatialReference" : { >>"wkid" : 2193 >> } >>} >> } >>] >> } >> Any

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-07 Thread Stephen Woodbridge
--- > *Von:* Robert Sanson [mailto:sans...@asurequality.com] > *Gesendet:* Sonntag, 7. März 2010 21:09 > *An:* 'Hugo'; Arnd Wippermann > *Cc:* users@openlayers.org > *Betreff:* Re: [OpenLayers-Users] Make vector layer from JSON > > I am wrestling with a simi

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-07 Thread Arnd Wippermann
rmann Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] Make vector layer from JSON I am wrestling with a similar problem. I am trying to read in data coming from an ArcGIS Server in JSON format. Unfortunately, ArcGIS Server doesn't serve GeoJSON. Here is a sample of what the data looks

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-07 Thread Robert Sanson
e" : { "wkid" : 2193 } } } ] } Any ideas how to get OL to read this into a Vector layer? Thanks, Robert >>> "Arnd Wippermann" 7/03/2010 10:43 a.m. >>> Hi, i would think, that you have to use geojson instead of json, to get the geomet

Re: [OpenLayers-Users] Make vector layer from JSON

2010-03-06 Thread Arnd Wippermann
] Make vector layer from JSON Hello all, I'm trying to create a vector layer based on a php query (which includes the_geom) encoded in JSON. Until the moment i haven't been able to achieve this. Following, is the relevant part of the code: var connect = new Ext.data.Connection(); conne

[OpenLayers-Users] Make vector layer from JSON

2010-03-06 Thread Hugo
Hello all, I'm trying to create a vector layer based on a php query (which includes the_geom) encoded in JSON. Until the moment i haven't been able to achieve this. Following, is the relevant part of the code: var connect = new Ext.data.Connection(); connect.request({ url: 'mfbase/geoquery.ph