jgimenez
Member
Hello
I'm having trouble displaying latitude and longitude markers in an app. Lat and long are stored ina a SQLite database
I create an activity (named mapas) with this code, but it shows me a blank map
Activity Name: mapas
One MapFragment (MapFragment1)
My code:
But i dont show what is wrong.
Please help me.
Thanks!
I'm having trouble displaying latitude and longitude markers in an app. Lat and long are stored ina a SQLite database
I create an activity (named mapas) with this code, but it shows me a blank map
Activity Name: mapas
One MapFragment (MapFragment1)
My code:
Marks In Map:
#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.
Private MapFragment1 As MapFragment
Private gmap As GoogleMap
Dim M1 As Marker
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("mapa")
End Sub
Sub Activity_Resume
Try
Wait For gmap_Ready
gmap = MapFragment1.GetMap
Dim latitud As Double
Dim longitud As Double
Dim registro As ResultSet=Main.SQL1.ExecQuery("Select id, latitud, longitud from coordenadas")
Do While registro.NextRow
latitud= registro.GetString("latitud")
longitud=registro.GetString("longitud")
M1 = gmap.AddMarker(latitud, longitud,"BACHE")
ToastMessageShow(latitud, True)
Loop
registro.Close
Catch
MsgboxAsync("Se produjo el error : "& LastException.Message,"Error")
End Try
End Sub
Sub MapFragment1_Ready
gmap = MapFragment1.GetMap
gmap.MyLocationEnabled = True
End Sub
But i dont show what is wrong.
Please help me.
Thanks!
Last edited: