We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 60151c9 + f6a3686 commit a58aa35Copy full SHA for a58aa35
lib/actions/map.js
@@ -44,7 +44,12 @@ export function setLocation(payload) {
44
const state = getState()
45
46
// reverse geocode point location if requested
47
- if (payload?.reverseGeocode) {
+ // if the name ends with a colon and a space, something has gone wrong with the
48
+ // e-scooter name generation and we need to reverse geocoder instead
49
+
50
+ // TODO: add a configuration item to allow this to be overridden on a node type basis.
51
+ // However, this will require an otp-ui patch
52
+ if (payload?.location?.name.endsWith(': ') || payload?.reverseGeocode) {
53
getGeocoder(state.otp.config.geocoder)
54
.reverse({ point: payload.location })
55
.then((location) => {
0 commit comments