Android Question Dynamic lines in Google Maps?

GaryK4

Member
Licensed User
Longtime User
I have developed my own golf score keeping program. Recently, I added Google maps for each of the hole.
Now I would like to add a way to measure from the tee box to a mid point and from the mid point to the green. I also want to be able to drag the mid point and have the lines and distances dynamically update.

Currently, I do automatically add a point at the green and allow a drop point.
I don't know how to draw lines, move lines and draw and move text on the map.

Is this currently possible with the available libraries in B4a?

The attached image may help explain this better.
 

Attachments

  • Golf Measure.jpg
    Golf Measure.jpg
    391.1 KB · Views: 670
OK, I have the polylines working. However, I don't see a method to add and move text on the map.
Therefore, I'm trying to use the marker title.
Upon DragEnd, how to you automatically display the updated title without tapping the screen?
 
Upvote 0
It is not possible to add Text on a Map. You can use a Canvas to draw the text on but you first need to get the Real Coordinates (compared to display coordinates) from GoogleMap to do so.
I cant help on this as i never used a Canvas with a Map. But i know that it is tricky. But doable.
 
Upvote 0
I was able to get the Snippet and title to stay visible and display the updated text. This works for me.
 
Upvote 0
Back
Top