At this point, I am going to switch to the HERE maps plugin. I tried to get the OpenStreetMaps places to work, but it could not find anything around.
In the next step of the construction of our map, we use PlaceSearchModel to search for places. As with the RouteModel before, MapItemView can display this model on our map.
Just like RouteModel, PlaceSearchModel needs some way of displaying the data; we could choose a ListView, which is useful for some purposes, but let's choose MapItemView for the visual effect.
We need to state which plugin we are using with searchArea and searchTerm:
PlaceSearchModel {
id: searchModel
plugin: mapPlugin
searchTerm: "coffee"
searchArea: QtPositioning.circle(startCoordinate)
Component.onCompleted: update()
}
Our MapItemView and delegate code look like this. The searchView delegate will...