Share My Creation GoogleMapsDemo

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.

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.

The project is still under 'construction', the save and load functions are not yet implemented.

upload_2018-4-15_12-27-2.png
 

Attachments

  • GoogleMapsDemoLight.zip
    7 KB · Views: 494
  • GoogleMapsDemo.zip
    32.6 KB · Views: 550
Last edited:

Star-Dust

Expert
Licensed User
Is there a way to remove all markers and polygons from the map?
That is, reset it
 

klaus

Expert
Licensed User
I had a look at the documentation.
I haven't found a method to remove all Markers, I found only the GoogleMap.RemoveMarker(Marker) method.
 
Last edited:

Star-Dust

Expert
Licensed User
I solved it by memorizing each object in a list and deleting all the objects in the list with the command GoogleMap.RemoveMarker(Marker) .

I am creating a customized version that approaches Google Earth with functions that are useful to me.

If it succeeds well I share it, otherwise better not to show it😁
 

AnandGupta

Well-Known Member
Licensed User
I solved it by memorizing each object in a list and deleting all the objects in the list with the command GoogleMap.RemoveMarker(Marker) .
This may also help,

Regards,

Anand
 

oparra

Well-Known Member
Licensed User
Last edited:

amorosik

Well-Known Member
Licensed User
If I try to use this project in debug it works fine
Also in release it works
But if I try to use the built-in packager, the exe produced does not start Starting from run_debug.bat I get this message


1634709891798.png



B4J 9.10, Jdk-11-0-1, Win 10 pro 64bit
What can the detected error depend on?
 

Erel

Administrator
Staff member
Licensed User
 

amorosik

Well-Known Member
Licensed User
Ok, for others who have the same problem, the lines were missing

#PackagerProperty: IncludedModules = javafx.web
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event;
 

AnandGupta

Well-Known Member
Licensed User
Ok, for others who have the same problem, the lines were missing

#PackagerProperty: IncludedModules = javafx.web
#PackagerProperty: AdditionalModuleInfoString = exports com.lynden.gmapsfx.javascript.event;
Thanks for the precise solution.
 

Erel

Administrator
Staff member
Licensed User

amorosik

Well-Known Member
Licensed User
It is actually a mistake to post it here.
1. It is incomplete. There is an important note about Java 14.
2. The most updated answer will be here: https://www.b4x.com/android/forum/t...-way-to-distribute-standalone-ui-apps.117880/

No
The two lines indicated are EXACTLY the solution to the problem for which I asked for information
And the post with which I asked for information is perfectly relevant to the topic on the first post, published by Klaus
Other information can certainly be helpful
But surely there was no error on what I indicated in order to resolve the error for which I asked for help
 
Top