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

@kdhy/gismap

v1.0.54

Published

## 安装 ``` npm i @kdhy/gismap ``` --------

Downloads

1

Readme

使用说明

安装

npm i  @kdhy/gismap

使用前注意事项

因为使用cesium,需要配置静态资源目录

1.服务配置静态资源目录

2.window['CESIUM_BASE_URL'] = '/static/Cesium'

Cesium使用静态资目录: node_modules/@kdhy/gismap/build/Cesium


使用

import GisMap from "@kdhy/gismap"

const gisMap = new GisMap('cesium')

使用文档目录

文档地址

基础方法

methods

| 方法名 | 说明 | 类型 | | :--------------- | :----------- | :--------------------------------------------------------------------------- | | setView | 设置视角 | (position) => void | | cZoomIn | 放大 | () => void | | cZoomOut | 缩小 | () => void | | setSceneMode2D3D | 2/3维转换 | (type: 2 | 3)=> void | | drawPoint | 绘制点 | (drawMpointOptions) => point | | drawLine | 绘制线 | (Array<[longitude,latitude,height]>,lineOptions) => polyLine | | drawAnimateLine | 绘制动态线 | (Array<[longitude,latitude,height]>,lineOptions) => polyLine | | drawPolyLine | 绘制管线 | (Array<[longitude,latitude,height]>,lineOptions) => polyLine | | remove | 移除元素节点 | (id | Entity)=>void |


position:{}

| 名称 | 说明 | 类型 | | :-------- | :--- | :----- | | longitude | 经度 | number | | latitude | 纬度 | number | | height | 高度 | number |


pointOptions:{}

| 名称 | 说明 | 类型 | | :-------- | :-------- | :-------------- | | longitude | 经度 | number | | latitude | 纬度 | number | | height | 高度 | number | | label | label展示 | Label | | tip | 单击展示 | Tip | | menu | 右键展示 | Menu |


lineOptions:{}

| 名称 | 说明 | 类型 | | :---- | :--- | :------- | | width | 宽度 | number | | color | 颜色 | CssColor |


Label:{}

| 名称 | 说明 | 类型 | | :----------- | :----------- | :------- | | show | 是否展示 | number | | text | 文本内容 | string | | fillColor | 标签填充颜色 | CssColor | | outlineColor | 标签字体轮廓 | CssColor |


Tip:{}

| 名称 | 说明 | 类型 | | :-------- | :------- | :---------- | | show | 是否展示 | number | | content | 内容 | HtmlString | | style | 样式 | {key:value} | | className | 外层类名 | string |


Menu:{}

| 名称 | 说明 | 类型 | | :-------- | :------- | :------------------------------- | | show | 是否展示 | number | | style | 样式 | {key:value} | | className | 外层类名 | string | | menuItems | 右键菜单 | Array<{text:string,type:string}> | | onSelect | 选中回调 | function(type,Entity) |


天气

| 方法名 | 说明 | 类型 | | :----------- | :------- | :------------------------------------------- | | setWeather | 设置天气 | (wether:'rain' | 'snow' | 'fog' ) => void | | clearWeather | 关闭天气 | |