views:

344

answers:

3

function json() {
var url="http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp:networkcoverage&CQL_FILTER= topp:CELL_ID='410-07-301-31781' Or topp:CELL_ID='nnn'&callback=?";

jQuery.getJSON(url,function(data){alert("Symbol: " + data.type + ", Price: " + data.bbox); });

}

error in FF :

Error: invalid label Source File: http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp%3Anetworkcoverage&CQL%5FFILTER=%20topp%3ACELL%5FID=%27410-07-301-31781%27%20Or%20topp%3ACELL%5FID=%27nnn%27&callback=processJSON Line: 1, Column: 1 Source Code: {"type":"FeatureCollection","features":[{"type":"Feature","id":"networkcoverage.13333","geometry":{"type":"MultiPolygon","coordinates":[[[[33.67787000000004,73.02342000000004],[33.68024256600006,73.02193745600005],[33.68066767800008,73.02342000000004],[33.......


i was happy with xmlhttp request unltill i came accross cross domain problem.. iv tried all sorts of libraries.. its the same error with all json fuctions

A: 

i thought there might be something wrong with the response but i put the response on this webs utility to check well formedness, and it was working fine on this url http://openlayers.org/dev/examples/vector-formats.html

what am i missing here?

Imran
A: 

I'm a GeoServer developer and this looks like a probable bug to me. I suggest you make sure you're using the latest version in the release series you're using (that is, 1.7.6 or 2.0 RC1) and make sure this hasn't been fixed in those versions. If it hasn't, try and produce a minimal dataset that demonstrates this problem and attach it to a ticket on GeoServer's issue tracker (http://jira.codehaus.org/browse/GEOS/). Make sure to mention you're using jquery since GeoServer's test suite does not include any actual browser testing (even the testing that we do with OpenLayers is done by hand.)

Good luck!

David Winslow
A: 

yea thanks a lot.. i upgraded from 1.7.2 to 1.7.4 .. now its flawless and the corss domain and same origin policy has been bypassed! however , rarely it hapens that some garbage characters also get appended before the inserted script object, but that hasnt happend from some time now.. I normaly dont use the latest versions cause at times latest releases are very unstable

Imran