Android Question Show google map market title

fanfalveto

Active Member
Licensed User
Longtime User
How can I add all the titles to each of the markers.
Any ideas ?, thanks
I tried Dim marker2 () as Marker and inside the for marker2 (i) but without success.

B4X:
Dim marker2 As Marker
........................................
Sub JobDone(job As HttpJob)
    If job.Success Then
        res = job.GetString
        Log("Response from server: " & res)
        parser.Initialize(res)
        Select job.JobName
            Case chicas
                todas = parser.NextArray 'returns a list with maps
                For i = 0 To todas.Size - 1
                    numero=todas.Size-1
                    m = todas.Get(i)
                    Dim latitud As Float
                    latitud =m.Get("latitud")
                    Dim longitud As Float
                    longitud=m.Get("longitud")
                    Dim nombre As String
                    nombre=m.Get("nombre")
                    marker2=GoogleMap1.AddMarker(latitud,longitud, nombre)
                    marker2.InfoWindowShown=True
                Next           
        End Select
    Else
        Log(job.ErrorMessage)
        ToastMessageShow("Error: " & job.ErrorMessage, True)
    End If
    job.Release

End Sub
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Try to move Dim Marker2 as Marker inside the loop, Just above marker2=GoogleMap1.AddMarker(latitud,longitud, nombre)
 
Upvote 0

fanfalveto

Active Member
Licensed User
Longtime User
Thank you for the answer, but when debug, I see that the titles are assigned to each one of them but only the last one is visible. = - (
 
Upvote 0
Top