Hello , I m new to this library and i couldnt find what i m looking for in the docs.
I have a map with a Marker and i would like to draw a circle with my marker as center with a certain radius.
My marker is a bus stop and the circle should show users a certain radius in meter
If anyone has clue on that
Thanks
There is Marker example and Custom Overlay example in the repo.
Also you can check Marker, Custom Overlay and other docs.
Ok so to solve this i have to create my own custom component and insert it in my map component right? There is no build in solution for this ?
Yes. Something like the following.
<MapGL ...>
<Marker ... />
<CircleOverlay .../>
</MapGL>
For the implementation of the circle, you can draw it on canvas (refer Custom Overlay, Canvas Overlay).
Or alternatively you can use deck.gl (refer DeckGL Overlay, DeckGL Scatterplot Layer).
<MapGL ...>
<DeckGL>
{...viewport}
layers={[
new ScatterplotLayer({
data: [...],
...,
})
]}
/>
</MapGL>
thanks a lot for your answers !
@dmi3y - might be relevant for you
Also missing this in the standard library. This was all so easy with Leaflet...
I just found a simple workaround to do this:
Most helpful comment
I just found a simple workaround to do this: