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
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
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
try" :
>>{
>> "x" : 1492934.61,
>> "y" : 5131545.29,
>> "spatialReference" : {
>>"wkid" : 2193
>> }
>>}
>> }
>>]
>> }
>> Any
---
> *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
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
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
] 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
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