Skip to content

wangz-code/L7Draw

 
 

Repository files navigation

L7Draw

基于 L7 封装的地理绘制库

npm Version npm Download Status Percentage of issues still open Average time to resolve an issue

📚 文档

文档 示例

🔨 工具

基于 L7Draw 的面向 GeoJSON 编辑工具 L7Editor 已上线,欢迎尝鲜~。

📦 安装

npm install @antv/l7-draw

🔨 使用

// ----js-----
import { GaodeMap, Scene } from '@antv/l7';
import { DrawEvent, DrawPoint } from '@antv/l7-draw';

const scene = new Scene({
  id: 'map',
  map: new GaodeMap({}),
});

scene.on('loaded', () => {
  // 实例化 Draw
  const draw = new DrawPoint(scene, {
    editable: false,
    // Draw 配置
  });

  // 调用 Draw 上的方法
  draw.enable();

  // 监听 Draw 的事件
  draw.on(DrawEvent.Add, (newPoint) => {
    console.log(newPoint);
  });
});

// ----html----
<div id="map"></div>;

⌨️ 本地开发

# 安装依赖
npm install

# 运行页面
npm run start

# 打包
npm run build

💬 答疑

在使用 L7Draw 过程中,若有疑惑无法在文档中解决的可以扫码加入 L7 官方答疑群。

🤝 如何贡献

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

📖 许可证

MIT@AntV.

About

L7 绘制控件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • Other 1.6%