Skip to content

Commit

Permalink
mapquest: drop jsonp in favour of standard XHR
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Jan 8, 2018
1 parent b693edd commit 1cfae96
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/geocoders/mapquest.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export default {
},

geocode: function(query, cb, context) {
Util.jsonp(this.options.serviceUrl + '/address', {
Util.getJSON(this.options.serviceUrl + '/address', {
key: this._key,
location: query,
limit: 5,
outFormat: 'json'
}, function(data) {
}, L.bind(function(data) {
var results = [],
loc,
latLng;
Expand All @@ -50,15 +50,15 @@ export default {
}

cb.call(context, results);
}, this);
}, this));
},

reverse: function(location, scale, cb, context) {
Util.jsonp(this.options.serviceUrl + '/reverse', {
Util.getJSON(this.options.serviceUrl + '/reverse', {
key: this._key,
location: location.lat + ',' + location.lng,
outputFormat: 'json'
}, function(data) {
}, L.bind(function(data) {
var results = [],
loc,
latLng;
Expand All @@ -75,7 +75,7 @@ export default {
}

cb.call(context, results);
}, this);
}, this));
}
}),

Expand Down

0 comments on commit 1cfae96

Please sign in to comment.