heregisvue v2.0.9
heregisvue
安装
npm install heregisvue
定义事件总线
import Vue from 'vue'
global.$EventBus = new Vue()
引用
import {
ArcGis,
esriModules,
wktUtils,
LatLon,
Widgets,
Editors,
BaseMapToggle
} from 'heregisvue'
初始化
export default {
mounted(){
this.init()
},
methods:{
async init() {
// 加载默认需要的js
await esriModules.loadModules();
const arcgis = new ArcGis();
arcgis.init({
// arcgis js api 配置,可选, 默认值如下
settings: {
url: 'https://arcgis.ynyc.com/arcgis_js_api/library/4.15/dojo/dojo.js',
css: 'https://arcgis.ynyc.com/arcgis_js_api/library/4.15/esri/themes/light/main.css'
},
// 字体地址,可选, 默认值如下
fontsUrl: 'https://arcgis.ynyc.com/arcgis_js_api/library/4.15/esri/themes/base/icons/fonts',
// 除默认模块外,需要加载的模块,可选
modules: [],
// 视图配置, 可选, 默认值如下
viewOptions: [{
// 视图容器id
container: this.mapId,
views: [
{
viewId: '2d',
viewType: 'MapView',
zoom: 7,
center: [101.9464253310309, 24.913562152358953],
}, {
viewId: '3d',
viewType: 'SceneView',
camera: {
position: [102.7, 25.04]
},
zoom: 17
}
]
}]
});
}
}
}
使用文档
更新日志
4 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago