mapgis-mvt-legend
<template> <mapgis-web-map class="mapgis-2d-map" v-bind="{ ...mapOptions }"> <mapgis-mvt-legend :outStyle="legendStyle"></mapgis-mvt-legend> </mapgis-web-map> </template> <script> export default { components: { "mapgis-web-map": window.Mapgis2d.MapgisWebMap, "mapgis-mvt-legend": window.Mapgis2d.MapgisMvtLegend }, data() { return { mapOptions: { crs: "EPSG:4326", //经纬度一定要设置crs参数 maxBounds: [ [-180, -90], [180, 90] ], zoom: 2, center: [110, 30], //设置地图样式信息 mapStyle: "http://develop.smaryun.com:6163/igs/rest/mrms/vtiles/styles/OSM全中国经纬度.json" }, legendStyle: { position: "absolute", zIndex: 900, right: "5px", bottom: "10px", maxHeight: "300px", width: "220px" } }; } }; </script> <style> .mapgis-2d-map { height: 300px; } </style>
outStyle
Object
{ left: "10px", top: "10px" }
visible
Boolean
true
← MVT比例尺 绘制 →