In the jGoogleMaps library, if we set for the Radius an integer value
Private r = 30 As Double
Circle1 = gmap.AddCircle(LatLong, r, 2, fx.Colors.Blue, fx.Colors.Blue, 0.25)
and we want to read it back
Radius = Circle1.Radius
we get following error:
Waiting for debugger to connect...
Program started.
Alert: Hide directions called
Alert: loadMapLibrary done
Error occurred on line: 50 (Main)
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
at com.lynden.gmapsfx.shapes.Circle.getRadius(Circle.java:45)
at anywheresoftware.b4j.objects.GoogleMapWrapper$CircleWrapper.getRadius(GoogleMapWrapper.java:578)
at b4j.google.map.main._gmap_ready(main.java:286)
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: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:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
Using Private r = 30.5 As Double works !
Using Private r = 30.0 As Double doesn't works !
Attached a test project.
Private r = 30 As Double
Circle1 = gmap.AddCircle(LatLong, r, 2, fx.Colors.Blue, fx.Colors.Blue, 0.25)
and we want to read it back
Radius = Circle1.Radius
we get following error:
Waiting for debugger to connect...
Program started.
Alert: Hide directions called
Alert: loadMapLibrary done
Error occurred on line: 50 (Main)
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
at com.lynden.gmapsfx.shapes.Circle.getRadius(Circle.java:45)
at anywheresoftware.b4j.objects.GoogleMapWrapper$CircleWrapper.getRadius(GoogleMapWrapper.java:578)
at b4j.google.map.main._gmap_ready(main.java:286)
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: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:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)
Using Private r = 30.5 As Double works !
Using Private r = 30.0 As Double doesn't works !
Attached a test project.