Socket
Book a DemoInstallSign in
Socket

@esmjs/geo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esmjs/geo

中国地理信息(GeoJSON)

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@esmjs/geo

@esmjs/geo
中国地理信息(GeoJSON)

NPM version

🚀 特性

  • 🦀 rust爬虫: 使用rust现代系统编程语言编写爬虫来获取中国地理信息,安全性高、速度快并且并发性高
  • 🐹 极快打包: 使用esbuild打包,本质使用go语言打包,拥有极快的打包速度
  • ⚡️ 完全可摇树: 自带Tree-shaking,只对引入的代码进行打包
  • 💫 零依赖: 零Dependencies依赖,只会安装项目本身
  • 🦾 强类型: 使用TypeScript编写,拥有强大的类型推导提示

📦 安装

# npm
npm install @esmjs/geo

# or yarn
yarn add @esmjs/geo

# or pnpm
pnpm add @esmjs/geo

📕 用法

// 如搭配 ECharts 地图组件,@esmjs/geo 还支持中国全省数据,请看下面的速查表
// import { china as geoChina } from "@esmjs/geo"; // 如有命名冲突使用 as 别名即可
import { china } from "@esmjs/geo";
import * as echarts from "echarts/core";

/**
 * 由于 echarts 没有导出 geoJSON 的 GeoJSONSourceInput 类型
 * china 只能导出标准的 GeoJSON 格式类型
 * 如果你的项目是 TypeScript 编写,下面代码加上 //@ts-expect-error 即可
 */
echarts.registerMap("china", { geoJSON: china });

🌍 使用场景

常用于 ECharts 地图组件

echarts-geo

🇨🇳 速查表

一个中国,34个省级行政区,23个省、5个自治区、4个直辖市、2个特别行政区

中国陕西山西辽宁吉林黑龙江
chinashaanxishanxiliaoningjilinheilongjiang
江苏浙江安徽福建江西山东
jiangsuzhejianganhuifujianjiangxishandong
河南湖北湖南广东海南四川
henanhubeihunanguangdonghainansichuan
贵州云南河北甘肃青海台湾
guizhouyunnanhebeigansuqinghaitaiwan
广西内蒙古西藏宁夏新疆北京
guangxineimengguxizangningxiaxinjiangbeijing
天津上海重庆香港澳门
tianjinshanghaichongqinghongkongaomen

🤔 FAQ

许可证

MIT © 2023-present, esmjs

Keywords

@esmjs/geo

FAQs

Package last updated on 01 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.