B4J Library jGoogleMaps library

Status
Not open for further replies.

jmon

Well-Known Member
Licensed User
Longtime User
{Following previous message}
I also get this error when resizing the window with no internet connection (that one crashes my app):

This error can be reproduced (in the example) if you have no internet connection when starting. It will crash the app directly.
You can try catch the error and it won't crash the app like this:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
    '...
    Try
        Dim options As MapOptions
        options.StreetViewControl = False
        gmap.Initialize("gmap", options)
        Pane1.AddNode(gmap.AsPane, 0, 0, Pane1.Width, Pane1.Height) 
    Catch
        '...
    End Try 
End Sub

Sub Pane1_Resize (Width As Double, Height As Double)
    Try
        gmap.AsPane.SetSize(Width, Height)
    Catch
        '...
    End Try
End Sub
but it shows a list of errors like the one above.

Thank you.

[Edit] edited the post with instructions on how to reproduce the bug
 
Last edited:

MichalK73

Well-Known Member
Licensed User
Longtime User
When my application is running behind a proxy server, the map does not appear. In a network without a proxy it is functioning properly. Can it be set to work behind a proxy server?
 

MichalK73

Well-Known Member
Licensed User
Longtime User
ok. I managed to connect to the proxy, but still does not display. Wine after the company administrator, blocked because the security policy of the company.

Thanks a lot.
 

Pere Vinyes

Member
Licensed User
Longtime User
This code works fine and shows the red google icon:
M=gmap.AddMarker(posx,posy,"Label")

But this code is not showing any icon on map. Do you know why?

file= "C:\x\icon1.png"
M=gmap.AddMarker2(posx,posy,"Label",file)

icon1 exists and is a simplification of file=File.GetUri( File.DirApp & "\icons\" , "icon1.png")

Thanks a lot
 

Pere Vinyes

Member
Licensed User
Longtime User
With the documentation available I can't fix it. And I read almost all B4J blog.

Again, with:
file= "C:\x\icon1.png"
M=gmap.AddMarker2(posx,posy,"Label",file)

with this two simple sentences the map is not showing the Icon and I think there are some library bug over there.

Could you please check it or supply and example?

thanks and kind regards.
 

Pere Vinyes

Member
Licensed User
Longtime User
I already read this information, Erel. It may work in B4A but not in B4J. (or where is the "DirAssets" directory location in B4J?)

Thanks "rboeck" for your answer but still does not work ... the red standard Google icon appears.

Someone has tried?

file= File.GetUri("c:\x","icon1.png")
M=gmap.AddMarker2(posx,posy,"Label",file)
 

rboeck

Well-Known Member
Licensed User
Longtime User
My mistake was, to think that other directories are also useable; i for myself used File.DirAssets. I made i working sample for you.
 

Attachments

  • Demo.zip
    3.1 KB · Views: 457

jmon

Well-Known Member
Licensed User
Longtime User
Did you set the proxy in Windows internet options?

This solution won't work if you are not already connected to internet on that computer. Basically it doesn't bridge your connection to the proxy directly.
 

Informatix

Expert
Licensed User
Longtime User
It's fixed. I had to add also the settings for https.
B4X:
SetSystemProperty("http.proxyHost", "10xxxx")
SetSystemProperty("http.proxyPort", "3xxxx")
SetSystemProperty("https.proxyHost", "10xxxxxx")
SetSystemProperty("https.proxyPort", "3xxxx")
SetSystemProperty("java.net.useSystemProxies", "False")
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…