continue refactor of geocoding services, improved locale, fixes on mapEdit
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
const isoCountries = require('./isoCountries')
|
||||
const nominatim = require('../../../server/services/geocoding/nominatim')
|
||||
const photon = require('../../../server/services/geocoding/photon')
|
||||
|
||||
// const geocodingProviders = [ nominatim, photon ]
|
||||
const geocodingProviders = [ nominatim, photon ]
|
||||
|
||||
// const geolocation = {
|
||||
// getGeocodingProvider(providerName) {
|
||||
// geocodingProviders.forEach((item) => {
|
||||
// if (item.commonName === settings.geocoding_provider_type) {
|
||||
// return item
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
const geolocation = {
|
||||
getGeocodingProvider(providerName) {
|
||||
let geocodingProvider
|
||||
geocodingProviders.forEach((item) => {
|
||||
if (item.commonName === providerName) {
|
||||
geocodingProvider = item
|
||||
}
|
||||
})
|
||||
return geocodingProvider
|
||||
}
|
||||
}
|
||||
|
||||
// module.exports = geolocation
|
||||
module.exports = geolocation
|
||||
Reference in New Issue
Block a user