Point.md
September 23, 2019 · View on GitHub
Point
Examples
-
Basic Usage
import { RCMap, TileLayer, Point, DivIcon } from 'rc-leaflet' ( <RCMap> <TileLayer /> <Point position /> <Point position> <DivIcon /> </Point> <DivIcon className> <Point /> </DivIcon> </RCMap> ) -
设置JSX内容
v1.2.0+( <RCMap crs center> <TileLayer /> <Point position> <Point.Content className>...</Point.Content> </Point> <Point position> <DivIcon> <Point.Content className>...</Point.Content> </DivIcon> </Point> <DivIcon className> <Point position> <Point.Content className>...</Point.Content> </Point> </DivIcon> </RCMap> )
Props
-
position
-
type:
L.LatLng | { lat: number, lng: number } | [number, number] -
required:
true -
点位的坐标
-
-
keyboard
-
type:
boolean -
required:
false -
点位是否支持鼠标交互,
Tab键切换不同点位,Enter键模拟点击
-
-
title
-
type:
string -
required:
false -
鼠标悬浮时显示的文本
-
-
alt
-
type:
string -
required:
false -
Icon组件img标签的alt属性
-
-
zIndexOffset
-
type:
number -
required:
false -
点位的
z-index值
-
-
opacity
-
type:
number -
required:
false -
点位的透明度
-
-
riseOnHover
-
type:
boolean -
required:
false -
鼠标悬浮时是否置顶
-
-
riseOffset
-
type:
number -
required:
false -
鼠标悬浮时
z-index的偏移值
-
-
shadowPane
-
type:
string -
required:
false -
点位阴影所在的图层
-
-
draggable
-
type:
boolean -
required:
false -
点位是否可以拖拽
-
-
autoPan
-
type:
boolean -
required:
false -
在地图边缘拖拽鼠标时是否自动平移地图
-
-
autoPanPadding
-
type:
[number, number] | L.Point -
required:
false -
在地图边缘拖拽鼠标时自动平移地图触发的边界位置
-
-
autoPanSpeed
-
type:
number -
required:
false -
在地图边缘拖拽鼠标时自动平移地图的像素值
-
Props inherited from InteractiveLayer
-
interactive
-
type:
boolean -
required:
false -
Point是否具有交互效果
-
-
bubblingMouseEvents
-
type:
boolean -
required:
false -
Point的鼠标事件是否冒泡
-
Props inherited from Layer
-
pane
-
type:
string -
required:
false -
default:
markerPane -
放置
Point的地图图层名称
-
-
attribution
-
type:
string -
required:
false -
版权描述
-
-
onCreate
-
type:
(layer: L.Layer) => void -
required:
false -
Point创建之后的回调
-
-
onAdd
-
type:
(e: L.LeafletEvent, layer: L.Layer) => void -
required:
false -
Point添加到图层之后的回调
-
-
onUpdate
-
type:
(layer: L.Layer) => void -
required:
false -
Point发生更新之后的回调
-
-
onBeforeRemove
-
type:
(layer: L.Layer) => void -
required:
false -
Point在删除之前的回调
-
-
onRemove
-
type:
(e: L.LeafletEvent, layer: L.Layer) => void -
required:
false -
Point删除时的回调
-
Props inherited from Evented
-
onClick
-
type:
(e: L.LeafletMouseEvent) => void -
required:
false -
Point鼠标点击时的回调
-
-
onMouseOver
-
type:
(e: L.LeafletMouseEvent) => void -
required:
false -
Point鼠标进入时的回调
-
-
onMouseOut
-
type:
(e: L.LeafletMouseEvent) => void -
required:
false -
Point鼠标离开时的回调
-