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
or is it possible to extract the response out of the javascript object if i do it this way below
function loadJSON() {
var url="http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=json&typeName=topp:networkcoverage&callback=processJSON";
var headID = document.getElementsByTagName("head")[0];
var newScript = document.createElement("script");
newScript.type = 'text/javascript';
newScript.src = url;
}
function processJSON(feed) {
document.writeln(feed.type);
}
its the same error .. and this method has been mentioned on the official geoserver website
geoserver.org/display/GEOSDOC/GeoJSON+Output+Format