mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
475 stars 133 forks source link

Circle annotation not displayed #1599

Closed florian-mlr closed 2 years ago

florian-mlr commented 2 years ago

Environment

Observed behavior and steps to reproduce

I've followed and copy paste the code given by the documentation https://docs.mapbox.com/android/maps/guides/annotations/annotations/ , the circle is not displayed on the map.

Expected behavior

Display a circle annotation on the map

Notes / preliminary analysis

I didn't test with an other device. I've tried with polygon annotation and I can successfully display a polygon however the polygon annotation is not displayed when creating a circle with the circle(@NonNull Point center, double radius, @IntRange(from = 1) int steps, @TurfConstants.TurfUnitCriteria String units) function from the mapbox-sdk-turf:6.4.0

ank27 commented 2 years ago

@florian-mlr please follow the example to create circle annotation: https://github.com/mapbox/mapbox-maps-android/blob/main/app/src/main/java/com/mapbox/maps/testapp/examples/markersandcallouts/CircleAnnotationActivity.kt

florian-mlr commented 2 years ago

Thank you @ank27 , it works ! I had to create the circle once the style was loaded (in the loadStyleUri callback)