Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Circle

Hierarchy

Implements

Index

Constructors

constructor

  • Instantiates a circle object given a geographical point, a radius in meters and optionally an options object.

    Parameters

    Returns Circle

Properties

editing

editing: any

options

options: any

Static CANVAS

CANVAS: boolean

True if Canvas is used for vector rendering (Android 2). You can also force this by setting global variable L_PREFER_CANVAS to true before the Leaflet include on your page — sometimes it can increase performance dramatically when rendering thousands of circle markers, but currently suffers from a bug that causes removing such layers to be extremely slow.

Static CLIP_PADDING

CLIP_PADDING: number

How much to extend the clip area around the map view (relative to its size, e.g. 0.5 is half the screen in each direction). Smaller values mean that you will see clipped ends of paths while you're dragging the map, and bigger values decrease drawing performance.

Static SVG

SVG: boolean

True if SVG is used for vector rendering (true for most modern browsers).

Static VML

VML: boolean

True if VML is used for vector rendering (IE 6-8).

Methods

addEventListener

  • addEventListener(type: string, fn: function, context?: any): Path
  • addEventListener(eventMap: any, context?: any): Path

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: function, context?: any): Path

addTo

  • Adds the layer to the map.

    Parameters

    Returns Path

bindPopup

  • Binds a popup with a particular HTML content to a click on this path.

    Parameters

    Returns Path

  • Binds a popup with a particular HTML content to a click on this path.

    Parameters

    Returns Path

  • Binds a popup with a particular HTML content to a click on this path.

    Parameters

    Returns Path

bringToBack

  • bringToBack(): Path
  • Brings the layer to the bottom of all path layers.

    Returns Path

bringToFront

  • bringToFront(): Path
  • Brings the layer to the top of all path layers.

    Returns Path

clearAllEventListeners

  • clearAllEventListeners(): Path

closePopup

  • closePopup(): Path
  • Closes the path's bound popup if it is opened.

    Returns Path

fire

  • fire(type: string, data?: any): Path
  • Parameters

    • type: string
    • Optional data: any

    Returns Path

fireEvent

  • fireEvent(type: string, data?: any): Path

getBounds

  • Returns the LatLngBounds of the path.

    Returns LatLngBounds

getLatLng

  • Returns the current geographical position of the circle.

    Returns LatLng

getRadius

  • getRadius(): number
  • Returns the current radius of a circle. Units are in meters.

    Returns number

hasEventListeners

  • hasEventListeners(type: string): boolean

off

  • off(type: string, fn?: function, context?: any): Path
  • off(eventMap?: any, context?: any): Path
  • Parameters

    • type: string
    • Optional fn: function
    • Optional context: any

    Returns Path

  • Parameters

    • Optional eventMap: any
    • Optional context: any

    Returns Path

on

  • on(type: string, fn: function, context?: any): Path
  • on(eventMap: any, context?: any): Path
  • Parameters

    Returns Path

  • Parameters

    • eventMap: any
    • Optional context: any

    Returns Path

onAdd

  • onAdd(map: Map): void
  • Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

    Parameters

    Returns void

onRemove

  • onRemove(map: Map): void
  • Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).

    Parameters

    Returns void

once

  • once(type: string, fn: function, context?: any): Path
  • Parameters

    Returns Path

openPopup

  • Opens the popup previously bound by the bindPopup method in the given point, or in one of the path's points if not specified.

    Parameters

    Returns Path

redraw

  • Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.

    Returns Path

removeEventListener

  • removeEventListener(type: string, fn?: function, context?: any): Path
  • removeEventListener(eventMap?: any, context?: any): Path

setLatLng

  • Sets the position of a circle to a new location.

    Parameters

    Returns Circle

setRadius

  • setRadius(radius: number): Circle
  • Sets the radius of a circle. Units are in meters.

    Parameters

    • radius: number

    Returns Circle

setStyle

  • Changes the appearance of a Path based on the options in the Path options object.

    Parameters

    Returns Path

toGeoJSON

  • toGeoJSON(): any
  • Returns a GeoJSON representation of the circle (GeoJSON Point Feature).

    Returns any

unbindPopup

  • unbindPopup(): Path
  • Unbinds the popup previously bound to the path with bindPopup.

    Returns Path

Static addInitHook

  • addInitHook(methodName: string, ...args: any[]): void
  • You can also use the following shortcut when you just need to make one additional method call.

    Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns void

Static extend

  • You use L.Class.extend to define new classes, but you can use the same method on any class to inherit from it.

    Parameters

    Returns any