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 🙏

© 2026 – Pkg Stats / Ryan Hefner

skcmap

v0.1.16

Published

cesium 和 openlayers 地图组件

Readme

地图组件 v0.1.7

作者:孙轲

QQ:397633183

安装过程种需要使用到pgsql、go、瓦片数据,应涉及到商业秘密,不便公开源码。如有问题,请联系我

前端安装

npm install skcmap

Api:

| 参数 | 类型 | 说明 | 默认值 | | ----------- | ------ | ------------------------------------------- | ----------------------- | | mapType | String | 地图类型(2d、3d) | 2d | | mapId | String | 地图容器id | mapId | | defaultZoom | Number | 地图默认展示级别 | 7.8 | | maxZoom | Number | 最大支持地图级别 | 16 | | minZoom | Number | 最小支持地图级别 | 5 | | center | Array | 地图中心 | [106.48885875, 26.1] | | mode | String | 地图模式(请看mode、drainageId、waterId介绍) | yx-xz | | baseId | String | 行政区域ID、水系ID、流域ID、部门ID | 520000000000000(贵州省) | | urls | Object | 2d或3d种使用到后端的服务地址 | {} |

mode

| 参数 | 说明 | |-----------|--------| | yx-xz | 行政影像地图 | | sl-xz | 行政矢量地图 | | yx-sx | 水系影像地图 | | sl-sx | 水系矢量地图 | | yx-depart | 部门影像地图 | | sl-depart | 部门矢量地图 |

urls

| 参数 | 说明 | | -------- | ----------------------------------------------------------- | | cmap | 切图服务URL | | gs | geoserver地址 | | tdToken | 天地图token(设置该值,启动天地图模式,不设置使用默认模式) | | terrain | 地形图地址 | | wms | wms地址 (3d模式需要) | | ionToken | cesiumtoken 3d模式需要) |

drainageId

| 参数 | 说明 | 中点 | | ------------------- | -------- | ----------------------- | | 1561630565578899456 | 长江流域 | ['106.48', '27'] | | 1561630667081039872 | 珠江流域 | ['106.415595656', '25'] |

waterId

| 参数 | 说明 | 中点 | | ------------------- | -------------- | -------------------------- | | 1561631028013453312 | 乌江水系 | ['106.83695544', '27'] | | 1561631028013453313 | 牛栏江横江水系 | ['104.051636911', '26.8'] | | 1561631028013453314 | 赤水河綦江水系 | ['106.284314708', '27.65'] | | 1561631028013453315 | 沅江水系 | ['108.545014803', '26.6'] | | 1561631028013453316 | 南盘江水系 | ['105.088825705', '25'] | | 1561631028013453317 | 北盘江水系 | ['105.30945576', '25.4'] | | 1561631028013453318 | 红水河水系 | ['106.696323624', '25.4'] | | 1561631028013453319 | 都柳江水系 | ['108.274150186', '25.6'] |

Methods

2d或3d 均可通过 getInstance方法回去map(2d)或者viewer(3d)实例,来做更多事情!

toggleLayer 图层切图都可以交此方法。参数就是一个对象,style:图层样式(不设置默认)layer:需要显示的图层