Skip to content

Commit

Permalink
Merge pull request #157 from openmove/techpark
Browse files Browse the repository at this point in the history
fix journey geocoder
  • Loading branch information
RudiThoeni authored Oct 10, 2022
2 parents 00787a4 + eae0e93 commit c556724
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions journey/src/otp-ui/geocoder/geocoders/abstract-geocoder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lonlat from "@conveyal/lonlat";
import {fromCoordinates} from "@conveyal/lonlat";

/**
* Create customized geocoder functions given a certain geocoding API, the
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions journey/src/otp-ui/geocoder/geocoders/arcgis.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lonlat from "@conveyal/lonlat";
import {fromCoordinates} from "@conveyal/lonlat";

import Geocoder from "./abstract-geocoder";

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions journey/src/otp-ui/geocoder/geocoders/noapi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lonlat from "@conveyal/lonlat";
import {toCoordinates, fromLatFirstString} from "@conveyal/lonlat";

import Geocoder from "./abstract-geocoder";

Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit c556724

Please sign in to comment.