I'm trying to get informations from geoserver with AjaX jQuery of my spatial data at the clicked point using WMS GetFeatureInfo. But I have this ERROR :
http://localhost:8082/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"> Invalid format 'text/javascript', supported formats are [text/plain, application/vnd.ogc.gml, text/xml, application/vnd.ogc.gml/3.1.1, text/xml; subtype=gml/3.1.1, text/html, application/json]
var clicked_coord;
var onSingleClick = function(evt){
var coord = evt.coordinate;
console.log(coord);
var str = coord;
var source1 = urldeep;
var source2 = urlground;
var layers_list = source1 + ',' + source2;
var view = map.getView();
var viewResolution = view.getResolution();
url = groundwatertable.getSource().getGetFeatureInfoUrl(
evt.coordinate, viewResolution,view.getProjection(),
{
'INFO_FORMAT': 'application/json',
'FEATURE_COUNT': 20,
'LAYERS': layers_list,
'QUERY_LAYERS': layers_list
});
console.log(url);
if (url) { //call parseResponse(data)
clicked_coord = coord;
$.ajax(url,
{dataType: 'jsonp'}
).done(function (data) {
});
}
'INFO_FORMAT': 'text/javascript'
? If you want a json response you should use'INFO_FORMAT': 'application/json'