B4J Question JGoogleMaps V2.01 problems

claudiob4

Member
Licensed User
Longtime User
Hi Erel, we have an application that uses jGoogleMaps and that currently no longer works. We have updated jgooglemaps v2.01 and java 19 B4J Ver. 10. Our application does not work well. GoogleMapsExample has the same problems, i.e. it does not display the map but only the markers. Furthermore, this warning appears during compilation: WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing.
Can you give us some help?
 

Attachments

  • GoogleMapsExample.png
    GoogleMapsExample.png
    37.1 KB · Views: 15
Last edited:

jahswant

Well-Known Member
Licensed User
Longtime User
It seems like only version number was updated. I downloaded the library as well but it doesn’t work either. The example have the same issue.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
We had the same problem and saw that the googlemaps.jar file was present in the internal libraries directory, we deleted it.
and we copy version 2.01 into the additional libraries directory.

1720253623972.png


log
1720253721040.png


iu.
1720253239939.png
 
Upvote 0

claudiob4

Member
Licensed User
Longtime User
We had the same problem and saw that the googlemaps.jar file was present in the internal libraries directory, we deleted it.
and we copy version 2.01 into the additional libraries directory.

View attachment 155233

log
View attachment 155234

iu.
View attachment 155232
TILogistic, It works for you. I checked to have the jGoogleMaps library only in the additional ones but GoogleMapsExample does not display the map. Can you please post your GoogleMapsExample code so I can check for a possible difference. Thank you
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Use api-key.
B4X:
Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.Show
    MainForm.RootPane.LoadLayout("1") 'Load the layout file.
    Dim options As MapOptions
    options.StreetViewControl = False
    options.MapTypeControl = False
    options.OverviewMapControl = False
'    gmap.Initialize("gmap", options) 'You should call Initialize2 and set the API key!
    gmap.Initialize2("gmap", Null, "AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    Pane1.AddNode(gmap.AsPane, 0, 0, Pane1.Width, Pane1.Height)
    MarkerInfos.Initialize
End Sub
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I had the same problem. I followed an alternative of @TILogistic advice and changed name (not deleted) to the jGoogleMaps.jar in C:\Program Files\Anywhere Software\B4J\Libraries.

I have added the jGoogleMaps.jar provided by @Erel in Additional Libraries of B4J and it worked ok.

I also right clicked and refreshed the libraries if it played any role.
 
Last edited:
Upvote 0
Top