Skip to content

Vue3/use address search functionality withing routing plugin - #947

Open
jedi-of-the-sea wants to merge 97 commits into
nextfrom
vue3/use-address-search-functionality-withing-routing-plugin
Open

jedi-of-the-sea wants to merge 97 commits into
nextfrom
vue3/use-address-search-functionality-withing-routing-plugin

Conversation

@jedi-of-the-sea

@jedi-of-the-sea jedi-of-the-sea commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The addressSearch functionality can now used in routing if reversedGeocoder is implemented´as well. A searchGroupId can be configured in routing, otherwise the defaultGroup is used.

For testing, I used a more extensive addressSearch configuration with several groups and categories to see the impact on the routing plugin:

Details
addPlugin(
	map,
	pluginAddressSearch({
		displayComponent: true,
		layoutTag: 'TOP_LEFT',
		searchMethods: [
			{
				groupId: 'address',
				categoryId: 'mpapi',
				queryParameters: {
					searchStreets: true,
					searchHouseNumbers: true,
				},
				type: 'mpapi',
				url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
			},
			{
				groupId: 'address',
				categoryId: 'nominatim',
				type: 'nominatim',
				url: 'https://polar.dataport.de/nominatim/search',
			},
			{
				groupId: 'Nominatim',
				categoryId: 'nominatim number 2',
				type: 'nominatim',
				url: 'https://polar.dataport.de/nominatim/search',
			},
		],
		minLength: 3,
		waitMs: 600,
		focusAfterSearch: true,
		groupProperties: {
			address: {
				label: 'Adresse',
				limitResults: 2,
			},
			Nominatim: {
				label: 'eigene Nominatim-Gruppe',
				limitResults: 2,
			},
		},
		categoryProperties: {
			mpapi: {
				label: 'Hamburg',
			},
			nominatim: {
				label: 'Nominatim',
			},
		},
	})
)

I also added searchGroupId: 'address' to the routing plugin configuration to specify the group that should be used for a search. As my search configuration does not include a default group, this must be defined for routing, otherwise the search will not work.

This PR should also fix a bug in routing:

reproduce in next:

  • after calculating a route with two waypoints, add one new waypoint
  • delete start or end waypoint from calculated route
  • route in map and routing details stay

fyi: to prevent another bug, i removed the check for incomplete routes, but I am not sure if this is necessary to prevent to many requests to the API and risk getting blocked for the rest of the day. I leave it out for now, but if reviewer says it should stay in, I'll add it again.

Instructions for local reproduction and review

  • start the snowbox client
  • the routing module
  • type into start input to search for an address, e.g. "Bahnhof"
  • select a result from the search results list. A blue point should appear on the map at the address you chose.
  • type into destination input to search
  • select a result from the list. Another blue point should be visible at the selected address.
  • the route calculation should be triggered after that, a blue line should appear on the map, connecting the blue points
  • route details should appear beneath the route options
image

Pull Request Checklist (for Assignee)

  • Changelogs are maintained
  • Functionality has been tested in Firefox, Chrome, Safari
  • Functionality has been tested on a smartphone
  • Functionality has been tested with 200% screen zoom
  • Screenreader functionality has been manually tested with NVDA

UI has been tested in the following tools regarding accessibility (only regarding functionality affected in this PR)

  • Chrome Lighthouse
  • Firefox Accessibility

Relevant tickets, issues, et cetera

Issue #865

@github-actions

github-actions Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-947/

Built to branch gh-pages at 2026-11-20 14:31 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@jedi-of-the-sea jedi-of-the-sea self-assigned this Aug 25, 2026
@jedi-of-the-sea jedi-of-the-sea added the enhancement New feature or request label Aug 25, 2026
@jedi-of-the-sea
jedi-of-the-sea marked this pull request as ready for review October 21, 2026 12:31
@jedi-of-the-sea
jedi-of-the-sea requested a review from a team October 21, 2026 12:31
@jedi-of-the-sea jedi-of-the-sea linked an issue Oct 28, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Routing: Search for addresses

2 participants