Marker and shape display
In the previous section, we successfully created a map display, but that is just the beginning of this project. We need to be able to display custom data in the form of markers or shapes layered on top of the map, so that the user can understand the data.
Displaying position markers on a map
If I tell you my favorite restaurant is located at (40.7802655, -74.108644
), you won't be able to make sense of it. However, if those coordinates are being displayed on the map view in the form of a location marker, instantly, you will have an idea of where it is. Let's see how we can add position markers to our map view!
First of all, we need a marker image that should look something like this, or even better, design your own marker:

After that, we need to register this image to our project's resource file. Open up resource.qrc
with Qt Creator and create a new prefix called images
. Then, add the marker image to the newly created prefix. Do make sure that the image has a transparent...