It would be useful if whenever we clicked on the map, along with adding a circular marker, we could also add a few words to describe what it is we're marking.
Getting some text from the program's user is going to be slightly complex, so let's create a simple version first to make sure we have the right code structure. Add the following two lines of code right at the end inside the
label = getlabelname() widget.create_text(x, y+2*size, text=label)
The first line of code gets some text from a function that we haven't written yet called
getlabelname. This function will eventually ask the user to type some text into a small pop-up window, but for now, it will just give us a default message. The second ...