Skip to content

Commit 1a7578e

Browse files
authored
Merge pull request #269 from ruscon/feature/mapquest-add-formatted-address
mapquest provider: add formattedAddress property
2 parents 085f39d + ec322b7 commit 1a7578e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/geocoder/mapquestgeocoder.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ MapQuestGeocoder.prototype._geocode = function(value, callback) {
7272

7373
MapQuestGeocoder.prototype._formatResult = function(result) {
7474
return {
75+
formattedAddress: [result.street, result.adminArea5, (result.adminArea3 + ' ' + result.postalCode).trim(), result.adminArea1].join(', '),
7576
'latitude' : result.latLng.lat,
7677
'longitude' : result.latLng.lng,
7778
'country' : null,

test/geocoder/mapquestgeocoder.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
var mock = sinon.mock(mockedHttpAdapter);
6262
mock.expects('get').withArgs(
63-
'http://www.mapquestapi.com/geocoding/v1/address',
63+
'https://www.mapquestapi.com/geocoding/v1/address',
6464
{ key: "API_KEY", location: "test" }
6565
).once().returns({then: function() {}});
6666

0 commit comments

Comments
 (0)