MapGIS WebClient for Video API 文档
主要介绍 MapGIS WebClient for Video 的用法
模块划分
地图库模块
地图视图
准备
如何获取 MapGIS WebClient for Video
开发时需要引入 MapGIS WebClient for Video 相关开发包。其中包括引擎核心库以及中地的插件库
外网
es5 方式
请在如下网址下载引擎核心库以及中地的插件库:
http://beta.smaryun.com/dev/download_detail.html#/download827
es6 方式
请通过 npm 的方式安装插件库,开发所需依赖,都在插件库中
npm install @mapgis/webclient-video-plugin
内网
es5 方式
请在如下网址下载引擎核心库以及中地的插件库:
插件库:http://192.168.11.130:4873/-/web/detail/@mapgis/webclient-video-plugin
es6 方式
请通过 npm 的方式安装插件库,开发所需依赖,都在插件库中
先将 npm 的源切换至内网
npm set registry http://192.168.11.130:4873/
然后通过 npm 进行安装
npm install @mapgis/webclient-video-plugin
引入
1、文件方式引入
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<!--引擎库-->
<link
rel="stylesheet"
href="http://{ip}:{port}/{你的路径}/leaflet/leaflet.css"
/>
<script src="http://{ip}:{port}/{你的路径}/leaflet/leaflet.js"></script>
<!--plugin库-->
<script src="http://{ip}:{port}/{你的路径}/zondyclient/webclient-common-plugin.js"></script>
<script src="http://{ip}:{port}/{你的路径}/zondyclient/webclient-leaflet-plugin.js"></script>
<script src="http://{ip}:{port}/{你的路径}/zondyclient/webclient-video-plugin.js"></script>
<!--设置场景视图的样式,一定要设置否则地图无法显示-->
<style>
#你的场景视图的id {
width: 100%;
height: 100%;
position: absolute;
}
</style>
</head>
</html>
2、npm 方式引入
找到你项目的 index.html 或者项目的 css 中设置如下样式
/*设置场景视图的样式,一定要设置否则地图无法显示*/
#你的场景视图的id {
width: 100%;
height: 100%;
position: absolute;
}
之后通过 npm 的方式引入插件库
npm install @mapgis/webclient-video-plugin
并且在项目的 main.js 中引入 leaflet 的 css 样式
import '@mapgis/leaflet/dist/leaflet.css'