leaflet
Version:
JavaScript library for mobile-friendly interactive maps
31 lines (30 loc) • 1.46 kB
TypeScript
import { CircleMarker } from './CircleMarker.js';
import { LatLngBounds } from '../../geo/LatLngBounds.js';
import type { CircleMarkerEventMap, CircleOptions, LatLngExpression } from '../../types.js';
/** @import {CircleMarkerEventMap, CircleOptions, LatLngExpression, PointExpression} from '../../types.js' */
/**
* A class for drawing circle overlays on a map with radius specified in meters. Extends `CircleMarker`.
*
* It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).
* @example
* ```js
* new Circle([50.5, 30.5], {radius: 200}).addTo(map);
* ```
* @template {CircleOptions} [O=CircleOptions]
* @template {CircleMarkerEventMap} [E=CircleMarkerEventMap]
* @extends {CircleMarker<O, E>}
*/
export declare class Circle<O extends CircleOptions = CircleOptions, E extends CircleMarkerEventMap = CircleMarkerEventMap> extends CircleMarker<O, E> {
_pxRadiusY: number | undefined;
static initHooks: boolean;
/**
* Instantiates a circle object given a geographical point, and an options object which contains the circle
* radius.
* @param {LatLngExpression} latlng
* @param {NoInfer<Partial<O>>} [options]
*/
constructor(latlng: LatLngExpression, options?: NoInfer<Partial<O>>);
/** Returns the `LatLngBounds` of the path. When the circle isn't on a map, they're approximated on a sphere. */
getBounds(): LatLngBounds;
_project(): void;
}