Hello, I need to add multiple circles in google maps and in the same way to be able to remove them all, so far I can add them, but I can't delete them, they keep drawing on themselves
Add Circles:
Dim Circle1 As Circle
Circle1 = gmapExtra.AddCircle(gmap, co)
save the circles to a list and then you have the references to delete them.
for example.
B4X:
'Global definition
Dim MyCircles as list
'initialisation
MyCircles.initialize
'... Your code...
Dim Circle1 As Circle
Circle1 = gmapExtra.AddCircle(gmap, co)
MyCircles.add(Curcle1)
' Later...
private sub Removeallcircles
for each c as circle in MyCircles
c.remove
next
end sub
save the circles to a list and then you have the references to delete them.
for example.
B4X:
'Global definition
Dim MyCircles as list
'initialisation
MyCircles.initialize
'... Your code...
Dim Circle1 As Circle
Circle1 = gmapExtra.AddCircle(gmap, co)
MyCircles.add(Curcle1)
' Later...
private sub Removeallcircles
for each c as circle in MyCircles
c.remove
next
end sub