NodeJS module for geocoding of address list
NodeJS module for geocoding of address list.
You can install this module using Node Package Manager (npm):
npm install multi-geocoder
The "geocode" method accepts address array and returns Promises/A+ instance that will be fulfilled with GeoJSON FeaturesCollection. You can choose geocode provider or coordinates order with the appropriate option. The following providers are available: "yandex" (default), "google".
var MultiGeocoder = require'multi-geocoder'geocoder = provider: 'yandex' coordorder: 'latlong' ;geocodergeocode'Moscow' 'New York' 'Paris' 'London'thenconsole.logres;;
If you have an array of objects with "address" property or addresses on a deeper level you should overlap the "getText" method of geocode provider as follows:
var MultiGeocoder = require'multi-geocoder'geocoder = provider: 'yandex' coordorder: 'latlong'provider = geocodergetProvider;return pointaddress;;geocodergeocode address: 'Moscow' address: 'New York' address: 'Paris' address: 'London'thenconsole.logres;;