0.5.2-4.m • Published 2 years ago

gisviewer-vue-cd v0.5.2-4.m

Weekly downloads
158
License
-
Repository
github
Last release
2 years ago

gisviewer-vue

地图容器成都

安装

npm install gisviewer-vue-cd -S

使用

main.js

import Vue from 'vue';
import App from './App.vue';
import GisViewer from 'gisviewer-vue';
import 'gisviewer-vue/lib/gis-viewer.css';

Vue.config.productionTip = false;
Vue.use(GisViewer);

new Vue({
  render: (h) => h(App)
}).$mount('#app');

App.vue

<template>
  <div id="app">
    <gis-viewer />
  </div>
</template>

<script>
export default {
  name: 'App'
};
</script>

<style>
#app {
  height: 100vh;
}
</style>

配置

Props

namedescriptiontypedefaltvalues
platform地图平台Stringarcgis3Darcgis2Darcgis3Ddugis(百度内网)mapabc(高德内网)bmap(百度)amap(高德)
map-config地图配置object依据 platform 不同有不同的配置内容

arcgis 地图配置

namedescriptiontyperequireddefaultvalues
arcgis_api本地 arcgis js api 地址Stringfalsearcgis online 上的最新 api 地址
theme地图主题样式Stringfalselightlightdarklight-bluedark-bluelight-greendark-greenlight-purpledark-purplelight-reddark-red
baseLayers底图Arraytrue

Events

namedescriptionparameters
map-loaded地图创建完成
showGisDeviceInfo撒点点击事件

接口说明

addoverlays 地图撒点接口

namedescriptiontypedefault
defaultType默认类型string
defaultSymbol默认符号string
overlays覆盖物属性object[]
  id覆盖物编号, 用于按编号删除string
  type覆盖物类型, 用于按类型删除string
  symbol覆盖物符号object
   type覆盖物符号类型 2d 或 3dstringpoint-2d/point-3d
   url覆盖物符号地址string
   primitive覆盖物的图元类型string2D 图元:"circle","square", "cross", "x","kite" ,"triangle"3D 图元:"sphere","cylinder", "cube","cone","inverted-cone","diamond","tetrahedron"
   color图元颜色number/string/number[]
   outline图元边框object
    size图元边框大小number
    color图元边框颜色number/string
   size覆盖物大小Array<number/string>/ number/string;
   anchor覆盖物锚点string"center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"
   rotation旋转角度number[]在 point-3d 时可用,x 轴角度, y 轴角度, z 轴角度
  geometry覆盖物几何属性object
   xx 坐标number
   yy 坐标number
   zz 坐标number
  fields覆盖物业务属性object
  buttons覆盖物弹出框的默认按钮,会覆盖 defaultButtonsobject[]
autoPopup是否自动显示弹出框, 只添加一个覆盖物时有效booleanfalse
showPopup点击后是否显示弹出框booleanfalse
defaultInfoTemplate配置 infoTemplate 需要显示的内容object
  title标题string
  content内容string
defaultButtons弹出框的默认按钮object[]
  label按钮文本string
  typejs 函数 mapFeatureClicked 的 type 参数string
showToolTip是否显示飞行提示booleanfalse
toolTipContent飞行提示内容string

deleteOverlays 删除撒点接口

deleteAllOverlays 删除全部撒点接口

addOverlaysCluster 点聚合接口

deleteOverlaysCluster 删除点聚合接口

deleteAllOverlaysCluster 删除全部点聚合接口

addHeatMap 热力图接口

deleteHeatMap 删除热力图接口

showLayer 显示图层

namedescriptiontypedefault
label图层名称string
type图层类型string

hideLayer 隐藏图层

namedescriptiontypedefault
label图层名称string
type图层类型string

findFeature 查找定位

setMapCenter 定位坐标

setMapCenterAndLevel 定位坐标层级

showJurisdiction()显示辖区

hideJurisdiction()隐藏辖区

showDistrictMask() 显示边界蒙层

namedescriptiontypedefault
name区县名称string
showMask是否显示外部蒙层boolean

hideDistrictMask() 显示边界蒙层

setMapStyle()高德设置地图样式

routeSearch()高德路径规划

clearRouteSearch()清除路径规划

showCustomTip()显示自定义弹窗

stopPlaySelectedRoute ()

startDrawOverlays ()手动画区域

stopDrawOverlays ()清除区域

getDrawOverlays ()得到手画区域

startGeometrySearch()区域搜索

clearGeometrySearch ()清除区域搜索

showMigrateChart()显示迁徙图

hideMigrateChart ()隐藏迁徙图

getDistance ()获取2点之间的距离计算(m)

searchPOI () 搜索兴趣点

searchType:

-- circle(圆形半径查询,需要中心点location和radius),

-- rect(面查询,需要paths坐标数组),

-- polygon(区域查询,需要city城市名称和district区域名称),

-- roadCross(查询路口),

searchTag是兴趣点类型标签,理论上可以不填,不过查询速度会受到影响,

searchName搜索关键字必填

0.5.2-3.m

2 years ago

0.5.2-2.m

2 years ago

0.5.2-1.m

2 years ago

0.5.2-4.m

2 years ago

0.5.18

2 years ago

0.5.19

2 years ago

0.5.16

2 years ago

0.5.17

2 years ago

0.5.15

2 years ago

0.5.20

2 years ago

0.5.10

3 years ago

0.5.11

3 years ago

0.5.14

2 years ago

0.5.12

3 years ago

0.5.13

2 years ago

0.5.7

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.2

3 years ago

0.4.97

3 years ago

0.4.98

3 years ago

0.4.95

3 years ago

0.4.96

3 years ago

0.4.93

3 years ago

0.4.94

3 years ago

0.4.91

3 years ago

0.4.92

3 years ago

0.4.99

3 years ago

0.4.90

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.87

3 years ago

0.4.88

3 years ago

0.4.89

3 years ago

0.4.86

3 years ago

0.4.85

3 years ago

0.4.84

3 years ago

0.4.82

3 years ago

0.4.81

3 years ago

0.4.80

3 years ago

0.4.79

3 years ago

0.4.78

3 years ago

0.4.76

3 years ago

0.4.75

3 years ago

0.4.73

3 years ago

0.4.74

3 years ago

0.4.71

3 years ago

0.4.72

3 years ago

0.4.70

3 years ago

0.4.68

3 years ago

0.4.69

3 years ago

0.4.67

3 years ago

0.4.64

4 years ago

0.4.65

4 years ago

0.4.66

4 years ago

0.4.63

4 years ago

0.4.62

4 years ago

0.4.61

4 years ago

0.4.60

4 years ago

0.4.59

4 years ago

0.4.58

4 years ago

0.4.48

4 years ago

0.4.49

4 years ago

0.4.46

4 years ago

0.4.47

4 years ago

0.4.53

4 years ago

0.4.54

4 years ago

0.4.51

4 years ago

0.4.52

4 years ago

0.4.50

4 years ago

0.4.57

4 years ago

0.4.55

4 years ago

0.4.56

4 years ago

0.4.42

4 years ago

0.4.43

4 years ago

0.4.40

4 years ago

0.4.41

4 years ago

0.4.44

4 years ago

0.4.32

4 years ago

0.4.39

4 years ago

0.4.37

4 years ago

0.4.38

4 years ago

0.4.35

4 years ago

0.4.36

4 years ago

0.4.33

4 years ago

0.4.34

4 years ago

0.4.31

4 years ago

0.4.30

4 years ago

0.4.29

4 years ago

0.4.28

4 years ago

0.4.27

4 years ago

0.4.26

4 years ago

0.4.25

4 years ago

0.4.24

4 years ago

0.4.23

4 years ago

0.4.21

4 years ago

0.4.22

4 years ago

0.4.20

4 years ago

0.4.19

4 years ago

0.4.18

4 years ago

0.4.17

4 years ago

0.4.16

4 years ago

0.4.15

4 years ago

0.4.14

4 years ago

0.4.13

4 years ago

0.4.12

4 years ago

0.4.11

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.99

4 years ago

0.3.98

4 years ago

0.3.97

4 years ago

0.3.96

4 years ago

0.3.95

4 years ago

0.3.93

4 years ago

0.3.91

4 years ago

0.3.90

4 years ago

0.3.88

4 years ago

0.3.87

4 years ago

0.3.86

4 years ago

0.3.85

4 years ago

0.3.84

4 years ago

0.3.83

4 years ago

0.3.82

4 years ago

0.3.81

4 years ago

0.3.80

4 years ago

0.3.78

4 years ago

0.3.77

4 years ago

0.3.75

4 years ago

0.3.76

4 years ago

0.3.74

4 years ago

0.3.73

4 years ago

0.3.72

4 years ago

0.3.71

4 years ago

0.3.70

4 years ago

0.3.63

4 years ago

0.3.62

4 years ago

0.3.61

4 years ago

0.3.52

4 years ago

0.3.51

4 years ago

0.3.50

4 years ago

0.3.43

4 years ago

0.3.42

4 years ago

0.3.41

4 years ago

0.3.40

4 years ago

0.3.38

4 years ago

0.3.37

4 years ago

0.3.36

4 years ago

0.3.35

4 years ago

0.3.34

4 years ago

0.3.33

4 years ago