umap-project / Leaflet.Label

Leaflet.Label reboot

Home Page:http://umap-project.github.io/Leaflet.Label/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Leaflet.Label

Leaflet.Label reboot.

Demo.

Includes:

  • Leaflet 1.0.0 support
  • polygons and polylines support
  • center, top and bottom label direction

May eventually be included in core, see Leaflet/Leaflet#3952

API

  • layer.bindLabel(content or label, options)

  • layer.unbindLabel()

  • layer.openLabel()

  • layer.closeLabel()

Options

  • direction=auto auto, left, right, top, bottom, center Where to display the label relatively to the feature.
  • offset=[6, 6] [x, y] Offset of the label relatively to the feature center point.
  • permanent=false boolean Always visible, or only on mouse over.
  • sticky=false boolean Follow the mouse instead of being fixed at the center.
  • interactive=false boolean Receive mouse events just like the feature it is attached to.
  • opacity=0.8 float Opacity of the label, between 0 and 1.

About

Leaflet.Label reboot

http://umap-project.github.io/Leaflet.Label/


Languages

Language:JavaScript 72.0%Language:HTML 22.9%Language:CSS 5.1%