npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

leaflet-layer

v1.2.12

Published

| 参数名 | 说明 | 类型 | | -------------------- | ----------------- | --------------------------------- | | renderType | 渲染类型 | string ('point','heat','cluster') | | renderPointColorType

Downloads

2

Readme

MarkersLayer

Options

MarkerLayerOptions

| 参数名 | 说明 | 类型 | | -------------------- | ----------------- | --------------------------------- | | renderType | 渲染类型 | string ('point','heat','cluster') | | renderPointColorType | 渲染颜色样式 | string ('single','segmented') | | iconType | 散点图标类型 | string ('unicode') | | iconSize | 图标大小 | [number, number] | | iconClass | 图标 class | string | | iconUnicode | 图标 unicode | string | | iconColor | 图标颜色 | string | | iconColor | 图标颜色 | string | | iconAnchor | 图标 anchor | [number, number] | | bubbleColorAttr | bubble 分色字段 | string | | bubbleSizeAttr | bubble 大小字段 | string | | bubbleStrokeWidth | bubble 边框宽度 | number | | bubbleStrokeColor | bubble 边框颜色 | string | | bubbleSizes | bubble 大小区间 | number[] | | bubbleColors | bubble 颜色区间 | string[] | | bubbleStrokeOpacity | bubble 边框透明度 | number | | bubbleFillOpacity | bubble 填充透明度 | number | | popupAttr | popup 显示字段 | string | | tooltipAttr | tooltip 显示字段 | string | | segmentedAttr | 分段渲染统计字段 | string | | segmentedColors | 分段渲染颜色区间 | string[] | | heatOptions | 热力图 options | MarkersHeatLayerOptions | | clusterOptions | 聚合 options | MarkersClusterOptions |

Methods

| 方法名 | 说明 | 类型 | | ---------------------- | ---------------------- | ----------------------------------------------------- | | draw | 画图层 | (options?: MarkersLayerOptions) => MarkersLayer | | redraw | 重新画图层 | () => MarkersLayer | | setData | 设置数据 | (data: DataListItem) => void | | getOptions | 获取当前 options | () => MarkersLayerOptions | | fitBounds | fit bounds | () => void | | getBounds | get bounds | ()=> L.LatLngBoundsExpression | | destroy | 销毁图层 | () => void | | toggleVisible | toggle visible | (visible: boolean) => void | | pitch | 选择并聚焦 | (id => string) => void | | getClassifiedColorRefs | 获取分类渲染颜色参照 | () => { attr: string, color: string, nums: number }[] | | getBubbledColorRefs | 获取气泡图渲染颜色参照 | () => { attr: string, color: string, nums: number }[] | | getBubbledSizeRefs | 获取气泡图渲染大小参照 | () => { size: number, range: [number, number]}[] |

MarkersBufferLayerOptions extends MarkerLayerOptions

| 参数名 | 说明 | 类型 | | ----------------- | ------------------------- | --------------------- | | bufferTooltipAttr | 缓冲点的 tooltip 展示字段 | string | | bufferOptions | 缓冲点的配置选项 | L.CircleMarkerOptions |

MarkersHeatLayerOptions

| 参数名 | 说明 | 类型 | | ------------- | ------------------ | ------ | | max | 最大值 | number | | radius | 半径 | number | | dimensionAttr | 热力图权重统计字段 | string |

MarkersClusterOptions

| 参数名 | 说明 | 类型 | | ------ | :---: | ---: | | | | |

PolylinesLayer

Options

PolylineLayerOptions

| 参数名 | 说明 | 类型 | | ----------------------- | ---------------- | ----------------------------- | | renderPolylineColorType | 渲染颜色样式 | string ('single','segmented') | | popupAttr | popup 显示字段 | string | | tooltipAttr | tooltip 显示字段 | string | | segmentedAttr | 分段渲染统计字段 | string | | segmentedColors | 分段渲染颜色区间 | string[] |

PolygonsLayer

Options

PolygonLayerOptions

| 参数名 | 说明 | 类型 | | ---------------------- | ---------------- | ----------------------------- | | renderPolygonColorType | 渲染颜色样式 | string ('single','segmented') | | popupAttr | popup 显示字段 | string | | tooltipAttr | tooltip 显示字段 | string | | segmentedAttr | 分段渲染统计字段 | string | | segmentedColors | 分段渲染颜色区间 | string[] |