Giter Site home page Giter Site logo

webclient-vue's Introduction

MapGIS WebClient for Vue

npm version apache licensed

目录

一、开始

1、主页

MapGIS Client for JavaScript

2、特性

  1. 组件式风格 - Vue组件式开发
  2. 面向对象编程 - 地图元素拥有 Vue 的生命周期,将原生地图事件封装成 Vue 的事件

二、深入了解

1、代码结构

 |-- WebClient-Vue
    |-- cesium                    -- Cesium的代码结构
        |--src                    -- Cesium源代码
        |--docs                   -- Vuepress文档说明
    |-- mapboxgl                  -- Mapboxgl 代码结构
        |--src                    -- MapboxGL源代码
        |--docs                   -- Vuepress文档说明

2、编译

如果您需修改源码,可自行编译打包生成MapBoxGL、Cesium的地图引擎库、API文档。

以MapboxGL为例,首先进入对应的目录下

  1. 进入目录

    cd /path/to/mapboxgl
  2. 安装依赖

    npm install
    # 或者
    yarn
  3. 地图组件编译

    npm run build           #编译 将源代码编译成Vue的地图组件
  4. API文档生成

    npm run docs:serve      #服务实时预览-生成API参考文档
    npm run docs:build      #编译打包预览-生成API参考文档

3、本地调试

以MapboxGL为例,首先进入对应的目录下,假设用户存在2个工程:1.WebClient-Vue 2.项目工程 MyProject

  1. 进入对应的目录

    cd /path/to/WebClient-Vue/mapboxgl
  2. 执行本地链接操作

    npm link

    得到对应的结果

  3. 进入自己的项目工程

    cd /path/to/MyProject
  4. 指定连接的WebClient-Vue库

    npm link @mapgis/webclient-vue-mapboxgl

    得到对应的结果

webclient-vue's People

Contributors

a-third-of-the-sweetness avatar gyj12 avatar iwantbestrong avatar killer1992 avatar liao-x-d avatar mayuanye2008 avatar parndeedlit avatar sunny-rgb avatar wang123-ks avatar xionglaoda avatar yuchao-xie avatar zhangying-zy618 avatar zhou-zhenxiong avatar zhunjoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webclient-vue's Issues

measure component and draw component can't support multiple call enableMeasure and enableDrawer when hot reload

vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'off' of null
at MapboxDraw.onRemove (setup.js?2140:15)
at o.removeControl (mapbox-gl.js?12f2:33)
at VueComponent.$_removeDrawControl (withControlEvents.js?20da:58)
at VueComponent.$_addDrawControl (withControlEvents.js?20da:42)
at VueComponent.enableDrawer (BaseDraw.vue?9d04:157)
at VueComponent.enableDrawer1 (HelloWorld.vue?140d:195)
at VueComponent.togglePolygon1 (HelloWorld.vue?140d:228)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at HTMLDivElement.invoker (vue.runtime.esm.js?2b0e:2179)
at HTMLDivElement.original._wrapper (vue.runtime.esm.js?2b0e:6917)

vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'off' of null
at MapboxDraw.onRemove (setup.js?5a7e:15)
at o.removeControl (mapbox-gl.js?10e2:33)
at VueComponent.$_removeMeasureControl (withControlEvents.js?e394:100)
at VueComponent.$_addMeasureControl (withControlEvents.js?e394:84)
at VueComponent.enableMeasure (Measure.vue?b5f7:120)
at VueComponent.enableMeasure (HelloWorld.vue?140d:121)
at VueComponent.toggleQueryArea (HelloWorld.vue?140d:169)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at HTMLDivElement.invoker (vue.runtime.esm.js?2b0e:2179)
at HTMLDivElement.original._wrapper (vue.runtime.esm.js?2b0e:6917)

Error in draw component destory

TypeError: this.removeSource is not a function
at VueComponent.remove (BaseDraw.vue?9d04:196)
at VueComponent.beforeDestroy (BaseDraw.vue?9d04:152)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at callHook (vue.runtime.esm.js?2b0e:4219)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:3978)
at destroy (vue.runtime.esm.js?2b0e:3159)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6114)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6119)
at VueComponent.patch [as patch] (vue.runtime.esm.js?2b0e:6467)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:4001)

vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'delete' of null
at MapboxDraw.webpack_exports.default.api.deleteAll (api.js?042a:142)
at VueComponent.remove (BaseDraw.vue?9d04:189)
at VueComponent.beforeDestroy (BaseDraw.vue?9d04:152)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at callHook (vue.runtime.esm.js?2b0e:4219)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:3978)
at destroy (vue.runtime.esm.js?2b0e:3159)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6114)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6119)
at VueComponent.patch [as patch] (vue.runtime.esm.js?2b0e:6467)

README.md中的URL网址http://develop.smaryun.com:8899/无效

### 1、司马云
[MapGIS Client for JavaScript](http://develop.smaryun.com:8899/)

浏览器提示ERR_CONNECTION_REFUSED

无法访问此网站develop.smaryun.com 拒绝了我们的连接请求。
请试试以下办法:

检查网络连接
检查代理服务器和防火墙
ERR_CONNECTION_REFUSED

Error in measure component destory

vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read property 'delete' of null
at MapboxDraw.webpack_exports.default.api.deleteAll (api.js?042a:142)
at VueComponent.remove (Measure.vue?b5f7:181)
at VueComponent.beforeDestroy (Measure.vue?b5f7:104)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at callHook (vue.runtime.esm.js?2b0e:4219)
at VueComponent.Vue.$destroy (vue.runtime.esm.js?2b0e:3978)
at destroy (vue.runtime.esm.js?2b0e:3159)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6114)
at invokeDestroyHook (vue.runtime.esm.js?2b0e:6119)
at VueComponent.patch [as patch] (vue.runtime.esm.js?2b0e:6467)

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.