直接跳到内容
本页目录

GeoJson ​

Layer created from a GeoJSON data structure.

基础用法 ​

API ​

属性 ​

属性名说明类型默认值必填备注
dataGeoJSON数据结构Object-是必须包含有效的GeoJSON数据
name图层名称string''否-
style应用到要素的基础样式Object{}否支持Leaflet Path样式选项
hover_style鼠标悬停时的要素样式Object{}否支持Leaflet Path样式选项
point_style点要素的特殊样式Object{}否支持Leaflet Path样式选项
style_callback动态样式回调函数Functionnull否(feature) => styleObject

事件 ​

事件名说明回调参数
click要素点击事件{ feature: GeoJSONFeature, layer: L.Layer }
hover要素悬停事件{ feature: GeoJSONFeature, layer: L.Layer }

插槽 ​

插槽名说明
--

方法 ​

方法名说明参数返回值
----

src/examples/vleaflet/layers/GeoJson

GeoJson已经加载完毕