Android Question Google maps ripple effect

microbox

Active Member
Licensed User
Longtime User
Hello everyone...I'm using DonManfred's great GoogleMapsRipple library. But I'm having issues when I'm trying to past 5 markers applying the ripple effects. And I need to reduce ripple.NumberOfRipples to 1 to avoid the crashing. Any idea how to resolve it? I'm using the following codes below...kindly check it.
B4X:
ub dispCoordinates
    Dim dbcursor As Cursor
    dbcursor = SQL.ExecQuery("SELECT * FROM coordinates")
 
    For i = 0 To dbcursor.RowCount -1
        dbcursor.Position = i
 
        Dim lat, lng As Double
        Dim id,cat As String
 
        id = dbcursor.GetString("id") ' Lat
        lat = dbcursor.GetDouble("lat") ' Lat
        lng = dbcursor.GetDouble("lon")  'Lng
        cat = dbcursor.GetString("cat") ' Name 
        coord.Initialize(lat, lng)
     
        If cat = "1" Then
            gmap.AddMarker3(lat,lng,cat,SetBitmapDensity(LoadBitmap(File.DirAssets, "person.png")))
        Else If cat = "2" Then
            gmap.AddMarker3(lat,lng,cat,SetBitmapDensity(LoadBitmap(File.DirAssets, "villa.png")))
        Else If cat = "3" Then
            gmap.AddMarker3(lat,lng,cat,SetBitmapDensity(LoadBitmap(File.DirAssets, "ambulance.png")))
     
        End If
      '##########################################
     
        ripple.Initialize("",gmap,coord)
        ripple.DurationBetweenTwoRipples = 2500
        'ripple.FillColor = Colors.Blue
        ripple.Distance = 50
        ripple.StrokeColor = Colors.Red
        ripple.Strokewidth = 20
        ripple.NumberOfRipples = 1
        ripple.RippleDuration = 5000
        ripple.startRippleMapAnimation
        '##########################################
    Next
    gmap.AnimateCamera(CameraPosition1)
    dbcursor.Close

End Sub
What I'm thinking.. there are limitations to the number of markers with ripple effects. I hope I'm wrong. :(
Thanks for the time and helping out.

regards,
joe
 
Last edited:
Top