I have a WMS query with url like this.
This url returns JSON result parseResponse( ...json...)
I want to create angularjs $http jsonp but it did not work.
function appCtrl($scope, $http){
function parseResponse(data) {
$scope.data = data
}
var httpOptions = {
url: "http://giswebservices.massgis.state.ma.us/geoserver/wms?VERSION=1.1.1&LAYERS=massgis:GISDATA.ACECS_POLY&SRS=EPSG:26986&BBOX=11830.0,776202.9449152543,348201.0,961492.0550847457&WIDTH=708&HEIGHT=390&INFO_FORMAT=text/javascript&FEATURE_COUNT=10&QUERY_LAYERS=massgis:GISDATA.ACECS_POLY&X=120&Y=109&FORMAT&STYLES=&SERVICE=WMS",
method: "JSONP",
params : {
REQUEST: 'GetFeatureInfo',
},
};
$http(httpOptions).
success(function(data){
console.log(data);
$scope.data = data;
}).
error(function(data){
console.log(data);
});
}
This gives error "parseResponse is not defined" But I defined that function