B4J Library jGoogleMaps library

Status
Not open for further replies.

rboeck

Well-Known Member
Licensed User
Longtime User
It's not possible, to write this code:
Dim Point as Latlng
Point.Latitude=12 (Property: Latitude is readonly)

In B4A and i think in all older versions of jgooglemaps.jar it was possible.
 

gvoulg

Member
Licensed User
Longtime User
Marker .remove and .label no longer exists.
Can we also have the latest version that supports them ?
George
 

Pedro Caldeira

Active Member
Licensed User
Longtime User
I Get an error just by running the example, after a few seconds I get the following Error.

B4X:
Waiting for debugger to connect...
Program started.
Error occurred on line: 64 (Main)
java.lang.NullPointerException
    at com.lynden.gmapsfx.javascript.object.GoogleMap.internalGetZoom(GoogleMap.java:76)
    at com.lynden.gmapsfx.javascript.object.GoogleMap.zoomProperty(GoogleMap.java:93)
    at com.lynden.gmapsfx.javascript.object.GoogleMap.setZoom(GoogleMap.java:68)
    at anywheresoftware.b4j.objects.GoogleMapWrapper.MoveCamera(GoogleMapWrapper.java:219)
    at b4j.google.map.main._btnresetmap_action(main.java:161)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:612)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:226)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
    at anywheresoftware.b4a.BA$2.run(BA.java:165)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    at java.lang.Thread.run(Thread.java:745)
 

Matias Ferrer

Member
Licensed User
Longtime User
Hello everyone.

I have a problem with jGoogleMaps with my application and also with the example application of the library.

After running the application, I wait for 5 seconds and the following error message appears:

"Oops! Something went wrong.

This page did not load Google Maps correctly. See the JavaScript console for technical details. "



I have updated the version of jGoogleMaps to 1.55 and my version of java to 1.8.0.121.
The error continues

Someone can help me.


Thank you!
 

bvonlaar

Member
Licensed User
Longtime User

Hi,
it works fine, but how can I change the color of the "text"

Benedikt
 

marcick

Well-Known Member
Licensed User
Longtime User
I was reading in poste 72

- I added the AddMarker3 function, which allows to specify an origin and an anchor position for the marker icon

But I understand the method has then been removed for some reasons.
So ... this is still a wish ....
 

klaus

Expert
Licensed User
Longtime User
there is an event like "clickPolygon" to select a polygon? Can the selected polygon change it (move nodes, etc ..)?
Yes.
You have the PolygonClick event when the user clicks on a polygon.
Then you can set it editable and / or draggable with the JavaObjects library.
Same for polyline and circle.
B4X:
Private Sub GMap_PolygonClick (SelectedPolygon As MapPolygon)
    Private joMapPolygon = SelectedPolygon As JavaObject
    joMapPolygon.RunMethod("setEditable", Array As Object(True))
    joMapPolygon.RunMethod("setDraggable", Array As Object(True))

You can also add a MouseMove event, look HERE.
 
Last edited:

ivanomonti

Expert
Licensed User
Longtime User
error

B4X:
Waiting for debugger to connect...
Program started.
Errore nella linea: 188 (Main)
java.lang.NullPointerException
    at anywheresoftware.b4j.objects.GoogleMapWrapper.setMapType(GoogleMapWrapper.java:646)
    at b4j.example.main._listview1_selectedindexchanged(main.java:1511)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
    at anywheresoftware.b4a.BA$1.run(BA.java:215)
    at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191)
    at java.lang.Thread.run(Thread.java:745)

B4X:
    googlemap.MapType = googlemap.MAP_TYPE_SATELLITE
    Dim cp As CameraPosition
    cp.Initialize(45.622065, 9.1053143, 18)
    googlemap.MoveCamera(cp)
 

Attachments

  • 2018-04-10_100004.png
    12.3 KB · Views: 566
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…