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

mapsetting-ts

v0.2.1

Published

map setting

Downloads

103

Readme

WebmapComponent

介绍

通用化地图组件,用于设备点位信息和矿井地图信息的展示,集成了编辑、展示、地图底图管理功能

项目编号

WMapCOM2302

技术选型

  • 打包工具:vite
  • 框架:react18,react-router,typeScript
  • UI框架:antd
  • 地图组件:[email protected]
  • 地图画布:@mapbox/mapbox-gl-draw
  • Geo计算:@turf/turf
  • 画面工具:mapbox-gl-draw-rectangle-mode
  • css框架:Unocss

更新

  1. 拉取项目:git clone 'ssh'
  2. 下载依赖:npm i
  3. 启动项目:npm run dev
  4. 构建生产版本:npm run build
  5. 发布项目:npm publish(发布之前需要推送项目到远程,需要登录npm, 使用npm login命令)

使用

  1. 项目使用:npm i mapsetting-ts
import { MapEdit, MapShow, MapUpload } from 'mapsetting-ts'
export default function App() {
  return <MapEdit />
}

结构

.
├── MapEdit // 编辑地图
│   ├── components
│   │   ├── CommonTitle.tsx // 公共标题
│   │   ├── FeaturesList.tsx // 详情组件
│   │   ├── FillProps.tsx // 面属性面板
│   │   ├── LayerPanels.tsx // 图层面板
│   │   ├── LineProps.tsx // 线属性面板
│   │   ├── PropsPanels.tsx // 属性面板包装
│   │   ├── Relevance.tsx // 关联设备面板
│   │   └── index.module.less // 组件样式
│   ├── index.module.less // 编辑样式
│   ├── index.tsx // 入口
│   └── map.css // 全局map样式
├── MapShow // 展示地图
│   ├── index.module.less // 样式文件
│   └── index.tsx // 入口
├── MapUpload // 地图管理
│   ├── components
│   │   ├── Dialog.tsx // 编辑弹窗
│   │   └── List.tsx // 列表
│   └── index.tsx // 入口
├── api // 地图接口文件
│   ├── map.ts
│   └── type.ts
├── assets // 地图静态文件
│   ├── image
│   │   ├── screen-show-bg.png
│   │   └── upsIcon.svg
│   └── react.svg
├── components
│   ├── Empty // 全局message
│   │   └── index.tsx
│   └── Icons //ICON文件
│       └── index.tsx
├── entry.ts // 打包入口
├── index.css // 全局样式
├── main.tsx // demo样式
├── mapSetting // 地图核心逻辑
│   ├── InfoBar.tsx // 信息组件
│   ├── Legend.tsx // 图例组件
│   ├── Preview.tsx // 展示组件
│   ├── cacheBaseMap.ts // 地图缓存
│   ├── drawStyle.ts // 画布样式
│   ├── index.css 
│   ├── index.module.less
│   ├── layerOptions.ts // 图层设置
│   ├── shim.d.ts
│   ├── tool.ts // 工具
│   ├── type.ts // 类型定义
│   └── useMap.ts // 地图hook
├── utils
│   ├── index.ts
│   ├── request.ts // 请求
│   └── ups.ts // ups独有接口
└── vite-env.d.ts