Tutorial Leaflet Intermediate – Leaflet Circle

A class for drawing circle overlays on a map. Extends CircleMarker.

It’s an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).

Usage example

// Circle

L.circle([-6.994687366967139, 109.11360522183594], {radius: 200}).addTo(map);

Creation

FactoryDescription
L.circle(<LatLnglatlng, <Circle optionsoptions?)Instantiates a circle object given a geographical point, and an options object which contains the circle radius.
L.circle(<LatLnglatlng, <Number> radius, <Circle optionsoptions?)Obsolete way of instantiating a circle, for compatibility with 0.7.x code. Do not use in new applications or plugins.

Options

OptionTypeDefaultDescription
radiusNumberRadius of the circle, in meters.

Keywords related:

openstreetmap
osm map
openstreetview
osm api
openstreet view

Leave a Reply

%d bloggers like this: