Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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).

like image 216
Bala Avatar asked Jun 25 '13 17:06

Bala


People also ask

Can I draw a radius circle on Google Maps?

Google Maps does not support the radius functionality, which means that you can't determine the radius around a given location. But you can measure the distance between two or more points. As a quick reminder, the radius of a circle is the distance from its edge to its center.

How do I draw a distance and radius on Google Maps?

Click on the map and create a popup marker to select the point. From there, opt for the “Draw Radius.” Choose the proximity distance from the given address found within the radius options in the software.

How do I draw a 5km radius on Google Maps?

Find the map's scale, extend your compass to cover 5km, stick the pin in your home address and give that bad boy a 360 degree twirl. That's your radius.


1 Answers

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);
like image 158
geraldarthur Avatar answered Sep 21 '22 11:09

geraldarthur