node-geocoder
Advanced tools
Comparing version 3.9.0 to 3.9.1
@@ -201,1 +201,7 @@ # Changelog | ||
* Google fix Substitute character | ||
## 3.9.1 | ||
* clean up algol geocoder | ||
* fix opendata france geocoder | ||
@@ -203,9 +203,4 @@ var net = require('net'); | ||
countryCode = attributes[property]; | ||
} | ||
if(property == 'Country') { | ||
country = attributes[property]; | ||
} | ||
if(property == 'Country') { | ||
country = attributes[property]; | ||
} | ||
} | ||
@@ -212,0 +207,0 @@ } |
@@ -90,13 +90,30 @@ var util = require('util'), | ||
return { | ||
'latitude' : latitude, | ||
'longitude' : longitude, | ||
'state' : properties.context, | ||
'city' : properties.city, | ||
'zipcode' : properties.postcode, | ||
'streetName': properties.street, | ||
'streetNumber' : properties.housenumber, | ||
'countryCode' : 'FR', | ||
'country' : 'France' | ||
var formatedResult = { | ||
latitude : latitude, | ||
longitude : longitude, | ||
state : properties.context, | ||
city : properties.city, | ||
zipcode : properties.postcode, | ||
citycode : properties.citycode, | ||
countryCode : 'FR', | ||
country : 'France', | ||
type: properties.type, | ||
id: properties.id | ||
}; | ||
if (properties.type === 'housenumber') { | ||
formatedResult.streetName = properties.street; | ||
formatedResult.streetNumber = properties.housenumber; | ||
} else if (properties.type === 'street') { | ||
formatedResult.streetName = properties.name; | ||
} else if (properties.type === 'city') { | ||
formatedResult.population = properties.population; | ||
formatedResult.adm_weight = properties.adm_weight; | ||
} else if (properties.type === 'village') { | ||
formatedResult.population = properties.population; | ||
} else if (properties.type === 'locality') { | ||
formatedResult.streetName = properties.name; | ||
} | ||
return formatedResult; | ||
}; | ||
@@ -103,0 +120,0 @@ |
{ | ||
"name": "node-geocoder", | ||
"version": "3.9.0", | ||
"version": "3.9.1", | ||
"description": "Node Geocoder, node geocoding library, supports google maps, mapquest, open street map, tom tom, promise", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ # node-geocoder | ||
var httpAdapter = 'http'; | ||
// optionnal | ||
// optional | ||
var extra = { | ||
@@ -22,0 +22,0 @@ apiKey: 'YOUR_API_KEY', // for Mapquest, OpenCage, Google Premier |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88803
2264