Android Question Select all markers maps sql

Croïd

Active Member
Licensed User
Longtime User
I use a SQL database with maps to display markers. I would make them invisible markers with the zoom.
if I only have one record in my file .db, this works well.
But if I have multiple record line, the function does not work !
do I have to initialize again sql?


B4X:
For i = 0 To sqlcursor.RowCount -1
sqlcursor.Position = i
'PinsId = sqlcursor.Getint("Id") ' ID
PinsTxt = sqlcursor.GetString("Site") ' Name
PinsLat = sqlcursor.GetDouble("Latitude") ' Lat
PinsLng = sqlcursor.GetDouble("Longitude")  'Lng
m1 = gmap.AddMarker3(PinsLat,PinsLng,PinsTxt,bmp.Bitmap)
Next
sqlcursor.Close

and

B4X:
Sub MapFragment1_CameraChange (Position As CameraPosition)
If gmap.CameraPosition.Zoom > 12 Then
'ToastMessageShow("+ 12",False)
m1.Visible = False
Else
m1.Visible = True   
End If       
End Sub
 

Croïd

Active Member
Licensed User
Longtime User
Can you tell me the problem with attachment ?

Just :

B4X:
Dim ListMarkers As List
ListMarkers.Add(m1)
 
Last edited:
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Thank you very much Erel, now it works well :rolleyes:, I a little confused
 
Last edited:
Upvote 0
Top