B4A Library WebMapView - Easy way to get Latitude and Longitude from map

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hi, i have found may be an accuracy error , try to compare the coordinates when you move marker versus googlemap with that cordinates. You can notice is not the same point in the map. How to fix this error please ?. Thank you in advance

Please check Version 0.05
 

dfrutos

Member
Licensed User
Longtime User
Hello, this library works with B4A V2.52??
I have an error in line Dim mpv As WebMapView... a fatal error, app stops immediately
 

dfrutos

Member
Licensed User
Longtime User
I have B4A 2.52 version... when i compile apk, when i execute app not work, the instance Dim mpx As WebMapView is wrong... is necesary download anything from sdk android?
 

dfrutos

Member
Licensed User
Longtime User
Dear somed3vloper, thanks for your help!

The log error is:

LogCat connected to: B4A-Bridge: HUAWEI HUAWEI G6-U251
--------- beginning of /dev/log/main
~i:** Activity (main) Resume **
Installing file.
~i:** Activity (main) Pause, UserClosed = false **
~i:** Activity (main) Resume **
~i:** Service (service1) Destroy **
~i:** Service (service1) Create **
~i:** Service (service1) Start **
Connected to B4A-Bridge (Wifi)
Installing file.
~i:** Activity (main) Pause, UserClosed = false **
~i:** Activity (main) Resume **
Streams_terminated
Connected to B4A-Bridge (Wifi)

PackageAdded: package:anywheresoftware.b4a.designer
Installing file.
PackageAdded: package:mapaejemplo.b4a
main_globals (java line: 346)
java.lang.NoClassDefFoundError: b4a.example.webmapview
at mapaejemplo.b4a.main._globals(main.java:346)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at mapaejemplo.b4a.main.initializeGlobals(main.java:226)
at mapaejemplo.b4a.main.afterFirstLayout(main.java:86)
at mapaejemplo.b4a.main.access$100(main.java:16)
at mapaejemplo.b4a.main$WaitForLayout.run(main.java:74)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5494)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
at dalvik.system.NativeStart.main(Native Method)
 

dfrutos

Member
Licensed User
Longtime User
#Region Project Attributes
#ApplicationLabel: WebMapView Example
'SupportedOrientations possible values: unspecified, landscape or portrait.

#End Region

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim mapv As WebMapView
Dim btn As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
btn.Initialize("btn")
btn.Text="Show WebMapView"
Activity.AddView(btn,0,0,100%x,10%y)
'
mapv.Initialize(Activity,Me,"OK","Cancel","48.8567","2.3508","mapview","Drag the marker to set your location",15,"google.maps.MapTypeId.ROADMAP")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
Sub btn_Click
mapv.Show_Me

End Sub
Sub mapview_DragEnd(lat As String,lon As String)
Log("Dragged to "&lat&","&lon)
End Sub

Sub mapview_Closed(lat As String,lon As String)
Log("Closed with "&lat&","&lon)
End Sub
Sub mapview_Cancelled
Log("Cancelled")
End Sub
 

dfrutos

Member
Licensed User
Longtime User
Yes, if i comment this line Activity.LoadLayout("Layout1") the error is the same...
 

dfrutos

Member
Licensed User
Longtime User
Thank you Erel and somed3v3loper... i will update version... and thank you for de code... i will try now...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…