README
Geowebmap
[TOC]
更新日志
版本 | 说明 |
---|---|
0.1.1 | 测试版本 |
安装
npm install -save geowebmap
快速启动
import Vue from "vue";
import GeoWebMap from "geowebmap";
Vue.use(GeoWebMap);
// or
import {
WebMap
// ...
} from "geowebmap";
Vue.component(WebMap.name, WebMap);
浏览器兼容性
现代流行的浏览器, IE 9+.
导航
标签
WebMap
地图初始标签,用于地图实例的初始化,初始示例:
<webmap></webmap>
Attribute
mapOption/初始化地图/object
{
mapOption: {
center: [116.46, 39.92],
zoom: 14
},
BaselayerConfig: [{
label: "中国地图",
type: "tile",
url: "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer",
visible: true
}],
layerConfig: []
}
Methods
getlayer/获取图层
getlayer(label)
setlayerVisible/设置图层可见度
setlayerVisible(layer, visible)
createlayer/创建图层
createlayer(layerconfig)
MapLabel
地图小部件,如map-zoom、map-compass、map-directions、map-locate等,以map-compass为例:
<map-compass :label="" :position="top-right"></map-compass>