Pass City as Marker in Android

73 views Asked by At

I would like to pass to my new activity the current city the user is in and display it in google map fragment inside a circle (like the area around the city) however it just adds the marker to the point, is there a way I can accomplish this?

thanks

1

There are 1 answers

0
N Dorigatti On BEST ANSWER

I don't know if i get your question, but if you want to show a circle (area), there is the "Circle" element: https://developers.google.com/android/reference/com/google/android/gms/maps/model/Circle

// Instantiates a new CircleOptions object and defines the center and radius
CircleOptions circleOptions = new CircleOptions()
    .center(new LatLng(37.4, -122.1))
    .radius(1000)); // In meters

// Get back the mutable Circle
Circle circle = myMap.addCircle(circleOptions);

Does it answer to your question? If no please provide further details on your needs!