Description
Use the reverseGeocoder plugin to retrieve addresses for the selected route coordinates and display them in the routing inputs instead of raw coordinates.
The reverseGeocoder plugin already provides the required building blocks: it watches configured coordinateSources and on change, resolves an address via reverseGeocode, then passes the resulting ReverseGeocoderFeature (which carries a human-readable title) to a configured addressTarget store action. This issue is about wiring the routing plugin into that mechanism so waypoint coordinates are shown as addresses.
Current behavior
The connection between the routing and reverseGeocoder plugin does not exist thus the coordinates are always displayed.
- The store holds waypoints as raw coordinates in
route (Coordinate[]).
- Each waypoint input in
RoutingInput.ce.vue binds directly to route[index], so the raw coordinate is what the user sees.
- There is no
coordinateSources/addressTarget link exposed by routing for reverseGeocoder to consume.
Expected behavior
Coordinates selected by a user are displayed as addresses if a client has the plugin reverseGeocoder configured.
- When
reverseGeocoder is configured with the routing plugin as a coordinate source, selecting/updating a waypoint triggers reverse geocoding.
- The resolved address (
ReverseGeocoderFeature.title) is stored in the routing state and displayed in the corresponding RoutingInput.ce.vue input while the coordinate is still used for the routing request.
- If
reverseGeocoder is not configured, behavior is unchanged and raw coordinates continue to be displayed.
- Loading/failure of reverse geocoding does not block route calculation; on failure the coordinate remains displayed.
Affected areas
| File |
What needs to change |
src/plugins/routing/store.ts |
Expose per-waypoint coordinate(s) as a coordinateSource for reverseGeocoder, add state to hold the resolved address labels, and add an addressTarget action to receive ReverseGeocoderFeature results. |
src/plugins/routing/components/RoutingInput.ce.vue |
Display the resolved address label instead of the raw route[index] value. Still use the raw coordinate as a fallback. |
src/plugins/routing/types.ts |
Extend RoutingPluginOptions and types if configuration is needed to enable the integration. |
src/plugins/reverseGeocoder/store.ts & src/plugins/reverseGeocoder/types.ts |
Verify coordinateSources support arrays of routing waypoints. Adjust if the current single-coordinate handling is insufficient. |
Out of scope
A user can not search for addresses.
Description
Use the
reverseGeocoderplugin to retrieve addresses for the selected route coordinates and display them in the routing inputs instead of raw coordinates.The
reverseGeocoderplugin already provides the required building blocks: it watches configuredcoordinateSourcesand on change, resolves an address viareverseGeocode, then passes the resultingReverseGeocoderFeature(which carries a human-readable title) to a configuredaddressTargetstore action. This issue is about wiring theroutingplugin into that mechanism so waypoint coordinates are shown as addresses.Current behavior
The connection between the
routingandreverseGeocoderplugin does not exist thus the coordinates are always displayed.route(Coordinate[]).RoutingInput.ce.vuebinds directly toroute[index], so the raw coordinate is what the user sees.coordinateSources/addressTargetlink exposed byroutingforreverseGeocoderto consume.Expected behavior
Coordinates selected by a user are displayed as addresses if a client has the plugin
reverseGeocoderconfigured.reverseGeocoderis configured with theroutingplugin as a coordinate source, selecting/updating a waypoint triggers reverse geocoding.ReverseGeocoderFeature.title) is stored in theroutingstate and displayed in the correspondingRoutingInput.ce.vueinput while the coordinate is still used for the routing request.reverseGeocoderis not configured, behavior is unchanged and raw coordinates continue to be displayed.Affected areas
src/plugins/routing/store.tscoordinateSourceforreverseGeocoder, add state to hold the resolved address labels, and add anaddressTargetaction to receiveReverseGeocoderFeatureresults.src/plugins/routing/components/RoutingInput.ce.vueroute[index]value. Still use the raw coordinate as a fallback.src/plugins/routing/types.tsRoutingPluginOptionsand types if configuration is needed to enable the integration.src/plugins/reverseGeocoder/store.ts&src/plugins/reverseGeocoder/types.tscoordinateSourcessupport arrays of routing waypoints. Adjust if the current single-coordinate handling is insufficient.Out of scope
A user can not search for addresses.