Star-Dust

Expert
Licensed User
Longtime User
I have laid the foundations for a multiplatform version.
At the moment it is in the B4A version and is being tested, subsequently I will make the necessary modifications to also work on B4I...

Several commands have changed because in B4A and B4I they become asynchronous and you will need to use 'WAIT FOR'. This means that the B4J source will not be perfectly compatible with the B4A/B4i source

 

Star-Dust

Expert
Licensed User
Longtime User
Update rel. 1.17
  • LatLonToAddress (lat As Double, lon As Double) As ResumableSub
    Returns the address from coordiantes
    WAIT FOR (GMapExt.LatLonToAddress(Latitude,Longitude)) COMPLETE (Address As String)
B4X:
Private Sub Gmap_Click (Point As LatLng)
    Log($"Click: ${Point.Latitude} - ${Point.Longitude}"$)
    WAIT FOR (GMapExt.LatLonToAddress(Point.Latitude,Point.Longitude)) COMPLETE (Address As String)
    Log(Address)
End Sub
 

Star-Dust

Expert
Licensed User
Longtime User
Update rel.1.18
  • added OpenMpas.AddPolygonHole, MapPolygon.SetHole, GetHole

B4X:
' Add Polygon with Hole
Dim OutLinePoints() As LatLng = Array(pt(37.5114, 15.08772), pt(37.509999999999996, 15.08862), pt(37.509999999999996, 15.08682), pt(37.5114, 15.08772))
Dim HolePoints() As LatLng = Array(pt(37.511, 15.08772), pt(37.5102334, 15.08817), pt(37.5102334, 15.08727), pt(37.511, 15.08772))
PlgH=GMap.AddPolygonHole(OutLinePoints, HolePoints, 1, fx.Colors.Red, fx.Colors.Green, 0.3)
ObjectMap.Put(PlgH.ID,PlgH)
 

Arnaud

Active Member
Licensed User
Longtime User
Hello,

I’m experiencing a bug specifically on MacBook M1 only (This work fine with Windows x64 or ARM. ) when testing the SampleOpenMap. There is no crash, but I see grey squares as shown in the attached image.

I believe this is the same issue as mentioned in post #41 , but I’m not sure if a resolution is available yet.
 

Attachments

  • 1775568891343.jpeg
    55.4 KB · Views: 38

Star-Dust

Expert
Licensed User
Longtime User
I want to be honest, I didn't think it would work with MacBook.

The rendering of the Map rarely went wrong, at the beginning of the development of this library the problem was linked to the choice of the java and javafx version with which I compiled the library. I solved it by compiling with java 19.

Similarly now I'm led to think for MacBook that it is linked to the javafx version available for Mac, but I can't guarantee this
 

Star-Dust

Expert
Licensed User
Longtime User
Are you talking about plotting the route to a destination?
 

Star-Dust

Expert
Licensed User
Longtime User
Maybe there is a way to blaze a trail with free api. While as far as traffic and suggestions for alternative routes are concerned, as far as I know, Google provides them with paid services available only if you use Google maps, I risk deactivation. Therefore not usable on Open Street Maps.

I am not documented if there are other similar traffic services, I hardly believe they are available for free.

I don't think of implementing route tracking immediately but it's not something I rule out in the future
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…