diff --git a/journey/src/otp-ui/geocoder/geocoders/abstract-geocoder.js b/journey/src/otp-ui/geocoder/geocoders/abstract-geocoder.js index a2c06858..0752b40f 100644 --- a/journey/src/otp-ui/geocoder/geocoders/abstract-geocoder.js +++ b/journey/src/otp-ui/geocoder/geocoders/abstract-geocoder.js @@ -1,4 +1,4 @@ -import lonlat from "@conveyal/lonlat"; +import {fromCoordinates} from "@conveyal/lonlat"; /** * Create customized geocoder functions given a certain geocoding API, the @@ -32,7 +32,7 @@ export default class Geocoder { * done to obtain that detailed data. */ getLocationFromGeocodedFeature(feature) { - const location = lonlat.fromCoordinates(feature.geometry.coordinates); + const location = fromCoordinates(feature.geometry.coordinates); location.name = feature.properties.label; location.rawGeocodedFeature = feature; return Promise.resolve(location); diff --git a/journey/src/otp-ui/geocoder/geocoders/arcgis.js b/journey/src/otp-ui/geocoder/geocoders/arcgis.js index 5737236a..f17064c2 100644 --- a/journey/src/otp-ui/geocoder/geocoders/arcgis.js +++ b/journey/src/otp-ui/geocoder/geocoders/arcgis.js @@ -1,4 +1,4 @@ -import lonlat from "@conveyal/lonlat"; +import {fromCoordinates} from "@conveyal/lonlat"; import Geocoder from "./abstract-geocoder"; @@ -26,7 +26,7 @@ export default class ArcGISGeocoder extends Geocoder { .search({ magicKey: feature.magicKey, text: feature.text }) .then(response => { const firstFeature = response.features[0]; - const location = lonlat.fromCoordinates( + const location = fromCoordinates( firstFeature.geometry.coordinates ); location.name = firstFeature.properties.label; diff --git a/journey/src/otp-ui/geocoder/geocoders/noapi.js b/journey/src/otp-ui/geocoder/geocoders/noapi.js index 946d5c36..4ca487c2 100644 --- a/journey/src/otp-ui/geocoder/geocoders/noapi.js +++ b/journey/src/otp-ui/geocoder/geocoders/noapi.js @@ -1,4 +1,4 @@ -import lonlat from "@conveyal/lonlat"; +import {toCoordinates, fromLatFirstString} from "@conveyal/lonlat"; import Geocoder from "./abstract-geocoder"; @@ -46,7 +46,7 @@ export default class NoApiGeocoder extends Geocoder { try { feature = { geometry: { - coordinates: lonlat.toCoordinates(lonlat.fromLatFirstString(string)), + coordinates: toCoordinates(fromLatFirstString(string)), type: "Point" }, properties: {