B4A Library Google Maps RippleEffect

This is a wrap for this Github project.

GoogleMapsRipple
Version: 2.01
  • MapRadar
    Methods:
    • Initialize (EventName As String, map As GoogleMap, latlon As LatLng)
    • IsInitialized As Boolean
    • startRadarAnimation
    • stopRadarAnimation
    • withClockWiseAnticlockwise (sweepAnimationClockWiseAnticlockwise As Boolean)
    • withClockwiseAnticlockwiseDuration (sweepAnimationClockwiseAnticlockwiseDuration As Int)
    • withDistance (distance As Int)
    • withLatLng (latLng As LatLng)
    • withOuterCircleFillColor (fillColor As Int)
    • withOuterCircleStrokeColor (strokeColor As Int)
    • withOuterCircleStrokewidth (strokewidth As Int)
    • withOuterCircleTransparency (transparency As Float)
    • withRadarColors (startColor As Int, tailColor As Int)
    • withRadarSpeed (sweepSpeed As Int)
    • withRadarTransparency (transparency As Float)
    Properties:
    • AnimationRunning As Boolean [read only]
    • ClockwiseAnticlockwiseDuration As Int [read only]
    • RadarAnimationClockWiseAnticlockwise As Boolean [read only]
    • RadarSpeed As Int [read only]
  • MapRipple
    Methods:
    • Initialize (EventName As String, map As GoogleMap, latlon As LatLng)
    • IsInitialized As Boolean
    • startRippleMapAnimation
    • stopRippleMapAnimation
    • withDistance (distance As Double)
    • withDurationBetweenTwoRipples (durationBetweenTwoRipples As Long)
    • withFillColor (fillColor As Int)
    • withLatLng (latLng As LatLng)
    • withNumberOfRipples (numberOfRipples As Int)
    • withRippleDuration (rippleDuration As Long)
    • withStrokeColor (strokeColor As Int)
    • withStrokewidth (strokewidth As Int)
    • withTransparency (transparency As Float)
    Properties:
    • AnimationRunning As Boolean [read only]

Setup your app to be able to use Google Maps

Code:
    Dim coord As LatLng
    coord.Initialize(editlat.Text, editlon.Text)
 
    ripple.Initialize("",gmap,coord)
    ripple.DurationBetweenTwoRipples = 2500
    ''ripple.FillColor = Colors.Blue
    ripple.Distance = 25
    ripple.StrokeColor = Colors.Red
    ripple.Strokewidth = 10
    ripple.NumberOfRipples = 4
    ripple.RippleDuration = 5000
    ripple.startRippleMapAnimation

Sample2.gif


New in V2
MapRadar
Sample3.gif




ATTENTION: Copy ALL Files to your Additional Libs folder
 

Attachments

Last edited:
If we do not use latlng, we can not use this library.
+1
 
Last edited:
Great, but I have a question:
What if I change positions?
Every time I change from latLng then go that does an Initialize?
Thank you.
 
How do I update the Ripple effect if the coordinate point is changed?
The first time
Code:
 coord.Initialize (editlat.Text, editlon.Text)
Then I want it to be displayed in (for example)
Code:
 Coord.Initialize (editlat.Text+10, editlon.Text+10)
And then in
Code:
 Coord.Initialize (editlat.Text+15, editlon.Text+12)
And so on successively and that the ripple effect moves with the point
 
I think I would need the method
Code:
mapRipple.withLatLng (LatLng changedLatlng)
To update the ripple center
 
is it possible to also use the 'radar animation'? :)
Sadfully i lost my Sources some months ago.

But i redownloaded the Github project at 10:50 AM and compiled the AAR with Android Studio
Then i rewrote the Ripple (AND the Radar) into the Library attached.
It is now 11:19 AM (nearly 30 Minutes :D)

PD: I did not tested it! ;-)
 

Attachments

I tried it and then i saw that i forgot something in the Radar.... The possibility to start it :D
Code:
Sub Globals
    Private gmap As GoogleMap
    Private MapFragment1 As MapFragment
    Private ripple As MapRipple
    Private radar As MapRadar
End Sub
Code:
Sub MapFragment1_Ready
    Log("MapReady()")
    gmap = MapFragment1.GetMap
    Dim m1 As Marker = gmap.AddMarker(50.833598,6.4411892, "test")
    Dim latlon As LatLng
    latlon.Initialize(50.833598,6.4411892) ' Home of DonManfred
    Dim cp As CameraPosition
    cp.Initialize(latlon.Latitude, latlon.Longitude, 15) ' Use own location LAT LON
    gmap.AnimateCamera(cp)

    ripple.Initialize("",gmap,latlon)
    radar.Initialize("",gmap,latlon)
    ripple.withDistance(500)
    ripple.withDurationBetweenTwoRipples(1500)
    ripple.withFillColor(Colors.Red)
    ripple.withStrokeColor(Colors.Blue)
    ripple.withStrokewidth(10)
    ripple.withTransparency(0.9)
    ripple.withRippleDuration(1000)
    ripple.startRippleMapAnimation

    radar.Initialize("",gmap,latlon)
    radar.withDistance(500)
    radar.withOuterCircleFillColor(Colors.Yellow)
    radar.withOuterCircleStrokeColor(Colors.Magenta)
    radar.withOuterCircleTransparency(1)
    radar.withRadarColors(Colors.Black,Colors.Cyan)
    radar.startRadarAnimation
End Sub
 

Attachments

Hi

How to change runtime Latitude and Longitude values...

Dim m1 As Marker = gmap.AddMarker(50.833598,6.4411892, "test")
Dim latlon As LatLng
latlon.Initialize(50.833598,6.4411892)

regards
kumar.s
 
Back
Top