df-cesium-vue
v1.2.1
Published
``` npm i df-cesium-vue npm i df-cesium-application ```
Downloads
2
Readme
Getting Started
npm i df-cesium-vue
npm i df-cesium-application
Basic usage:
import { DfCesiumComponent } from "df-cesium-vue";
import { ShapeBaseConfig } from "df-cesium-application";
<template>
<DfCesiumComponent
ref="dfcesium"
@mapHandlerCallBack="mapHandlerCallBack"
@mapRenderCallBack="mapRenderCallBack"
@cameraHeightChangeCallBack="cameraHeightChangeCallBack"
/>
</template>
下面业务代码:例子
// 初始化地图,callback 返回实例,需要查看实例方法可在这里看
const params={
mapType:'',
defaultAccessToken:'',
options:{}
}
const initMap=(params)=>{
this.$refs.dfcesium.initMap(params,callback)
}
// 地图加载完毕回调函数
mapRenderCallBack(mapRenderOver) {
console.log("地图切片加载完毕", mapRenderOver);
this.$data.mapRenderOver = mapRenderOver;
this.$data.loading = false;
this.initShapes();
},
// 地图事件回调
mapHandlerCallBack(type, params){
}
// 比例尺高度变化回调
cameraHeightChangeCallBack(){
}
其他功能如创建自定义任务等请联系做作者!!!