iOS Question How to draw a circle in Google Maps

Luiz Fernando Orlandini

Active Member
Licensed User
Initialize it and then you can add circles with this code:
B4X:
Sub gmap_Click (Point As LatLng)
   gextra.AddCircle(Point.Latitude, Point.Longitude, 10000, Colors.Red)
End Sub
Thanks Erel. I just received a message saying that GoogleMapsExtras was created in a newer version than mine. I'm using B4i 1.8, we have any new version?

Thanks.
 

Luiz Fernando Orlandini

Active Member
Licensed User
Initialize it and then you can add circles with this code:
B4X:
Sub gmap_Click (Point As LatLng)
   gextra.AddCircle(Point.Latitude, Point.Longitude, 10000, Colors.Red)
End Sub
Erel it works very well =D

Just one more requirement... Is it possible to set a alpha in fillColor, since it's necessary to see the map content below draw circle
 

Luiz Fernando Orlandini

Active Member
Licensed User
I found the code below in GMaps docs...

B4X:
CLLocationCoordinate2D circleCenter = CLLocationCoordinate2DMake(37.35, -122.0);
GMSCircle *circ = [GMSCircle circleWithPosition:circleCenter
                                         radius:1000];

circ.fillColor = [UIColor colorWithRed:0.25 green:0 blue:0 alpha:0.05];
circ.strokeColor = [UIColor redColor];
circ.strokeWidth = 5;
circ.map = mapView;
But I don't know how to write this code in B4i.
 
Top