Coder Social home page Coder Social logo

aixinyongheng / l7plot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antvis/l7plot

0.0 0.0 0.0 8.3 MB

🌍 Geospatial Visualization Chart Library

Home Page: https://l7plot.antv.vision

License: MIT License

JavaScript 1.54% Shell 0.03% TypeScript 98.37% Less 0.06%

l7plot's Introduction

English | 简体中文

L7Plot

🌍 基于 L7 的地理空间可视化图表库。

Version Status Release Status Coverage Status Percentage of issues still open Average time to resolve an issue

网站快速开始API图表示例

✨ 特性

  • 📦 开箱即用:配置式的地理图表,内置多粒度行政数据
  • 🚀 元素丰富:图表类型及地图组件丰富,多地图底图支持
  • 💯 容易定制: 数据驱动,从数到形,支持多图层及多图表层叠
  • 🌱 动态交互:图表交互能力强、支持 2/3D 视角、提供命令式动态交互 API

📦 安装

$ npm install @antv/l7plot

🔨 使用

import { Dot } from '@antv/l7plot';

const data = [
  { lng: 103.715, lat: 31.211, depth: 10, mag: 5.8, title: 'M 5.8 - eastern Sichuan, China' },
  { lng: 104.682, lat: 31.342, depth: 10, mag: 5.7, title: 'M 5.7 - eastern Sichuan, China' },
  // ...
];

const dot = new Dot('container', {
  map: {
    type: 'mapbox',
    style: 'light',
    center: [103.447303, 31.753574],
    zoom: 7,
  },
  autoFit: true,
  source: {
    data: data,
    parser: { type: 'json', x: 'lng', y: 'lat' },
  },
  color: {
    field: 'mag',
    value: ['#82cf9c', '#10b3b0', '#2033ab'],
    scale: { type: 'quantize' },
  },
  size: {
    field: 'mag',
    value: ({ mag }) => (mag - 4.3) * 10,
  },
  state: { active: true },
  scale: { position: 'bottomright' },
  legend: { position: 'bottomleft' },
  tooltip: {
    items: ['title', 'mag', 'depth'],
  },
});

本地开发

# 全局安装 yarn
$ npm install yarn -g

# 安装项目依赖
$ yarn bootstrap

# 实时编译各 package 并启动 storybook
$ yarn dev

# 运行网站
$ yarn dev-website

# 运行单元测试
$ yarn test

# 打开 electron 运行单元测试,并监听测试文件
$ yarn test-live

🤝 如何贡献

如果您在使用的过程中碰到问题,可以先通过 issues 看看有没有类似的 bug 或者建议。

如需提交代码,请遵从我们的贡献指南

许可证

MIT

l7plot's People

Contributors

lvisei avatar lxfu1 avatar susiwen8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.