Some time ago I played a lot with GoogleMaps according to this post:
https://www.b4x.com/android/forum/t...oglemaps-handling-polygons.84238/#post-533844
The problem was to add other shapes on a googlemap overlapping existing shapes.
When you move the mouse over an existing shape the cursor doesn't work anymore and the arrow symbol of the cursor changes to a hand allowing its selection.
The user who asked this question got the solution.
Now a new question was asked here:
https://www.b4x.com/android/forum/threads/calcolare-superficie-con-google-map.91740/#post-580370
I added the area calculation.
ATTENTION: the jGoogleMaps library needs Java 19 !
And, as it might be interesting for others, I upload the two projects below:
GoogleMapsDemoLight, a light version of GoogleMapsDemo below for better understanding.
GoogleMapsDemo, this project contains almost everything I found in the forum.
You can draw different shapes, markers or InfoWindows onto a GoogleMap and edit their properties.
The project has a Pane for the GoogleMap and three Canvases.
One Canvas to draw the cursor.
The second Canvas for the intermediate lines, moving lines during the drawing.
The third Canvas for the shapes.
In the VIDEO you see red lines for the cursor, these lines are drawn onto the first Canvas.
You see red lines between the current point and the previous point during drawing, these lines are drawn onto the second Canvas. When you click to insert a point the current shape is drawn in blue, these lines are drawn onto the third Canvas.
When you click onto a shape, its contour is highlighted with red lines, these lines are drawn onto the third Canvas.
https://www.b4x.com/android/forum/t...oglemaps-handling-polygons.84238/#post-533844
The problem was to add other shapes on a googlemap overlapping existing shapes.
When you move the mouse over an existing shape the cursor doesn't work anymore and the arrow symbol of the cursor changes to a hand allowing its selection.
The user who asked this question got the solution.
Now a new question was asked here:
https://www.b4x.com/android/forum/threads/calcolare-superficie-con-google-map.91740/#post-580370
I added the area calculation.
ATTENTION: the jGoogleMaps library needs Java 19 !
And, as it might be interesting for others, I upload the two projects below:
GoogleMapsDemoLight, a light version of GoogleMapsDemo below for better understanding.
GoogleMapsDemo, this project contains almost everything I found in the forum.
You can draw different shapes, markers or InfoWindows onto a GoogleMap and edit their properties.
The project has a Pane for the GoogleMap and three Canvases.
One Canvas to draw the cursor.
The second Canvas for the intermediate lines, moving lines during the drawing.
The third Canvas for the shapes.
In the VIDEO you see red lines for the cursor, these lines are drawn onto the first Canvas.
You see red lines between the current point and the previous point during drawing, these lines are drawn onto the second Canvas. When you click to insert a point the current shape is drawn in blue, these lines are drawn onto the third Canvas.
When you click onto a shape, its contour is highlighted with red lines, these lines are drawn onto the third Canvas.
Attachments
Last edited: