mapbox-maps-flutter
mapbox-maps-flutter copied to clipboard
Whats the easiest way to draw an area of influence around a point? lets say draw a circle 5000 meters radius around those coordinates?
lets say I have this coordinates lat: 39, lon: -9.
How can I draw something like this?
or this:
Hi @ember11498, you can add a CircleAnnotation
at the given coordinate to achieve what you want, please take a look at this example
@maios thank you for the reply. But can I make the circle 5km radius from my coordinates? Does it have that parameter? it has a circleRadius parameter but isnt that in pixels?
Cannot see anywhere explicitly saying what exactly is the circleRadius. meters? km? pixels?
my bad, we are indeed lack of documentation on this SDK on that part, we will add it as soon as we can. Anyway, the unit of circle-radius
is in pixels as stated in this style-spec
Our CircleAnnotationsManager
unfortunately do not support Expressions, they only support values as constant for now. You can however use low-level Style API to add a layer and set its layer properties to the style.
However, with your use case the expression will be quite tricky, we have a similar example in iOS where we calculate the radius based on zoom level here
I just wanted to say that this is a blocker for our project and a reason why we keep using flutter_map
and not Mapbox's solution
it is hard to use.