GithubHelp home page GithubHelp logo

834897006 / vue-cesium-draw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xtfge/cesium-draw

0.0 0.0 0.0 46.41 MB

This is a Vue + Cesium project. Its main functions include plotting and editing marker, polyline and polygon.

License: Apache License 2.0

JavaScript 90.03% HTML 3.60% Vue 1.83% CSS 4.53%

vue-cesium-draw's Introduction

这是一个Vue+Cesium的项目,主要功能包括点、线、面的标绘及编辑。

详情如下 :

  • 添加标记,提供多种图标选择、添加完成后右击可编辑,支持自定义图标
  • 线、多边形绘制,可以编辑节点和属性信息
  • 导入导出功能(json,Geojson,shp)

使用说明

依次输入以下命令运行该项目:

npm install

npm start

或着你也可以把它添加到自己的项目使用:

1.你可以把components和js文件夹中的文件全部拷贝到自己的项目,然后引入drawViewer组件

import drawViewer from '@/components/drawViewer'

2.把drawViewer添加到conponents

3.在标签中添加drawViewer

<draw-viewer :polylineNode="false" :polygonNode="true"></draw-viewer>

此外,如果你没有使用Vue框架,并不影响核心功能drawHandler的使用,只需要在options中添加editPanel为false即可,当然你需要手动删除 drawHandler文件中关于editPanel文件的引用

import {Polyline,Polygon} from "@/js/drawHandler";
const viewer=new Cesium.Viewer('container')
const options=Polyline.defaultStyle()
options.editPanel=false
const pl=new Polyline(viewer,options)
pl.initNodes()//如果要显示顶点

效果

avatar avatar

vue-cesium-draw's People

Contributors

xtfge 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.