You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tomáš Malý edited this page Aug 6, 2020
·
2 revisions
Search
The application may want to search on the map for, say, a specific city.
The library provides capabilities exactly for that.
Method Map::search takes the search query and optionally center point of the search.
The method returns a shared pointer to SearchTask, which will be filled by the results, when it finishes.
Field SearchTask::done will be set to true once the results are available.
Afterwards, vector SearchTask::results contains multiple structures SearchItem, of which the fields SearchItem::title, SearchItem::region and SearchItem::distance are most descriptive of the individual results.
It also contains SearchItem::position and SearchItem::radius which may be used to directly jump to the destionation.
The complete, unprocessed answer from the server is available in the SearchItem::json.