Search
SearchControl is one search box over places, points of interest, trails, itineraries, zones and collections. It searches through the map's client, and highlights what the reader picks.
Put SearchControl in the stack's children:
Search runs on the Data API, so the map's client needs a session token beside the key. With one, the box needs no other prop.
Pick the kinds of result, their order, how many of each, and the language they answer in:
The list shows places first, then itineraries, then zones, five of each at most, named in French.
Left alone, a pick moves the camera onto the result and highlights it on the map. Pass onSelect to decide yourself:
Each row hands back a payload that says what it is: a place, a trail, an itinerary, a zone.
useSearch runs the same search and hands you the rows, for markup of your own:
The pause between keystrokes, the cancelled rounds and the fallback to the whole world are handled for you.