Bala
Bala

Reputation: 353

drawing circle with radius specified in meters on a map

Any pointers on how to draw a circle of radius, specified in meters, on top of a geographical map using D3 would be pretty helpful.

I tried to use Leaflet and it's Circle(or CircleMarker) that accepts radius in meters, but I need more flexibility to play with my data. D3 seems to be pretty helpful, but am not sure how to draw a circle of given radius on top of a map, such the circle covers an area corresponding to the given radius (and adapts to zoom and change in projection).

Upvotes: 21

Views: 53473

Answers (1)

geraldarthur
geraldarthur

Reputation: 1524

You can pass these radii in meters using the latest version of Leaflet. The radius will change relative to zoom levels.

Here's some more information via Leaflet's documentation

L.circle([lat,lng], radius).addTo(map);

Upvotes: 52

Related Questions