I am getting Uncaught SyntaxError: Unexpected token < error.can any one help me to find what is wrong with below code
function SearchbyAttribute(filter) {
$.ajax({
type: 'GET',
contentType: "application/jsonp; charset=utf-8",
dataType: 'jsonp',
jsonpCallback: "parseResponse",
data: {
typeName: "typename=school:school",
outputFormat: "text/javascript",
service: "WMS",
version: "1.1.0",
request: "GetMap",
CQL_FILTER: filter
},
success: function (response) {
var j = JSON.decode(response);
alert(response);
//SearchResultsLayer.setSource(null);
//var searchresultssource = new ol.source.GeoJSON({
// object: response,
// projection: 'EPSG:3857'
//});
//SearchResultsLayer.setSource(searchresultssource);
//view.fitExtent(SearchResultsLayer.getSource().getExtent(), map.getSize());
},
error: function (e) {
alert("error");
}
});
}