| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b0bbcc8 commit e521b7f
29 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -137,14 +137,6 @@ | |||
| 137 | 137 | "icon": "arcgislayer.png", | |
| 138 | 138 | "update": "最后更新时间:2021-01-07" | |
| 139 | 139 | }, | |
| 140 | - { | ||
| 141 | - "name": "Google图层", | ||
| 142 | - "file": "googlelayer", | ||
| 143 | - "diffcult": "2", | ||
| 144 | - "detail": "", | ||
| 145 | - "icon": "googlelayer.png", | ||
| 146 | - "update": "最后更新时间:2021-01-07" | ||
| 147 | - }, | ||
| 148 | 140 | { | |
| 149 | 141 | "name": "天地图图层", | |
| 150 | 142 | "file": "tdtlayer", | |
@@ -187,6 +179,22 @@ | |||
| 187 | 179 | } | |
| 188 | 180 | ] | |
| 189 | 181 | }, | |
| 182 | + { | ||
| 183 | + "name": "Vue-ArcGIS", | ||
| 184 | + "iconfont": "icon_ogc", | ||
| 185 | + "folder": "vue-arcgis", | ||
| 186 | + "leaffolder": true, | ||
| 187 | + "childs": [ | ||
| 188 | + { | ||
| 189 | + "name": "ArcGIS瓦片", | ||
| 190 | + "file": "arcgisTile", | ||
| 191 | + "diffcult": "2", | ||
| 192 | + "detail": "", | ||
| 193 | + "icon": "marker.png", | ||
| 194 | + "update": "最后更新时间:2021-06-04" | ||
| 195 | + } | ||
| 196 | + ] | ||
| 197 | + }, | ||
| 190 | 198 | { | |
| 191 | 199 | "name": "Vue-交互", | |
| 192 | 200 | "iconfont": "iconhand_draw", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,71 @@ | |||
| 1 | + <!DOCTYPE html> | ||
| 2 | + <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="utf-8" /> | ||
| 5 | + <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | ||
| 6 | + <title>Vue-arcgisTile</title> | ||
| 7 | + <script include="vue" exclude="plugin" src="./static/libs/include-mapboxgl-local.js"></script> | ||
| 8 | + <style type="text/css"> | ||
| 9 | + body { | ||
| 10 | + margin: 0px !important; | ||
| 11 | + } | ||
| 12 | + #app { | ||
| 13 | + margin: 0 0; | ||
| 14 | + width: 100vw; | ||
| 15 | + height: 100vh; | ||
| 16 | + overflow: hidden; | ||
| 17 | + } | ||
| 18 | + .map { | ||
| 19 | + position: absolute; /* 只能是绝对布局 */ | ||
| 20 | + top: 0; | ||
| 21 | + bottom: 0; | ||
| 22 | + height: 100%; | ||
| 23 | + width: 100%; | ||
| 24 | + } | ||
| 25 | + </style> | ||
| 26 | + </head> | ||
| 27 | + | ||
| 28 | + <body> | ||
| 29 | + <div id="app"> | ||
| 30 | + <mapgis-web-map | ||
| 31 | + id="map" | ||
| 32 | + :map-style="mapStyle" | ||
| 33 | + :zoom="mapZoom" | ||
| 34 | + :center="outerCenter" | ||
| 35 | + :crs="mapCrs" | ||
| 36 | + v-on:load="handleMapLoad"> | ||
| 37 | + <mapgis-arcgis-tile-layer | ||
| 38 | + :layer-id="layertileid" | ||
| 39 | + :base-url="tileurl"> | ||
| 40 | + </mapgis-arcgis-tile-layer> | ||
| 41 | + </mapgis-web-map> | ||
| 42 | + </div> | ||
| 43 | + <script> | ||
| 44 | + new Vue({ | ||
| 45 | + el: '#app', | ||
| 46 | + data() { | ||
| 47 | + return { | ||
| 48 | + mapStyle: { | ||
| 49 | + //设置版本号,一定要设置 | ||
| 50 | + version: 8, | ||
| 51 | + //添加来源 | ||
| 52 | + sources: {}, | ||
| 53 | + //设置加载并显示来源的图层信息 | ||
| 54 | + layers: [] | ||
| 55 | + }, // 地图样式 | ||
| 56 | + mapZoom: 8, // 地图初始化级数 | ||
| 57 | + outerCenter: [114.299039,30.594797], // 地图显示中心 | ||
| 58 | + mapCrs: 'EPSG:3857', | ||
| 59 | + layertileid:"layerid", | ||
| 60 | + tileurl:"http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer" | ||
| 61 | + }; | ||
| 62 | + }, | ||
| 63 | + methods: { | ||
| 64 | + handleMapLoad(payload) { | ||
| 65 | + this.map = payload.map; | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + }); | ||
| 69 | + </script> | ||
| 70 | + </body> | ||
| 71 | + </html> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,23 +23,31 @@ | |||
| 23 | 23 | <div id="app"> | |
| 24 | 24 | <mapgis-web-map | |
| 25 | 25 | id="map" | |
| 26 | - :access-token="accessToken" | ||
| 27 | 26 | :map-style="mapStyle" | |
| 28 | 27 | :zoom="mapZoom" | |
| 29 | 28 | :center="outerCenter" | |
| 30 | 29 | :crs="mapCrs" | |
| 31 | 30 | v-on:load="handleMapLoad" | |
| 32 | 31 | > | |
| 33 | - <mapgis-ogc-wmts-layer :layer="layerWmts" :layer-id="layerWmtsId" :source-id="sourceWmtsId" :url="wmtsurl"> | ||
| 34 | - </mapgis-ogc-wmts-layer> | ||
| 35 | - <mapgis-rastertile-layer | ||
| 36 | - :layer="layerRaster" | ||
| 37 | - :layer-id="layerRasterId" | ||
| 38 | - :source="sourceRaster" | ||
| 39 | - :source-id="sourceRasterId" | ||
| 40 | - > | ||
| 41 | - </mapgis-rastertile-layer> | ||
| 42 | - <mapgis-attribution :position="position" :compact="compact" :custom-attribution="attrbution"/> | ||
| 32 | + <mapgis-ogc-wmts-layer | ||
| 33 | + :layer-id="layerWmtsId" | ||
| 34 | + :source-id="sourceWmtsId" | ||
| 35 | + :base-url="wmtsurl" | ||
| 36 | + :tile-matrix-set="tileMatrixSet" | ||
| 37 | + :wmts-layer="layer" | ||
| 38 | + :format="format" | ||
| 39 | + :token="token"> | ||
| 40 | + </mapgis-ogc-wmts-layer> | ||
| 41 | + <mapgis-rastertile-layer | ||
| 42 | + :layer="layerRaster" | ||
| 43 | + :layer-id="layerRasterId" | ||
| 44 | + :source="sourceRaster" | ||
| 45 | + :source-id="sourceRasterId"> | ||
| 46 | + </mapgis-rastertile-layer> | ||
| 47 | + <mapgis-attribution | ||
| 48 | + :position="position" | ||
| 49 | + :compact="compact" | ||
| 50 | + :custom-attribution="attrbution"/> | ||
| 43 | 51 | </mapgis-web-map> | |
| 44 | 52 | </div> | |
| 45 | 53 | <script> | |
@@ -62,7 +70,11 @@ | |||
| 62 | 70 | layerWmts: {}, | |
| 63 | 71 | layerWmtsId: 'ogcwmts_layerId', | |
| 64 | 72 | sourceWmtsId: 'ogcwmts_sourceId', | |
| 65 | - wmtsurl: 'http://t0.tianditu.com/DataServer?T=vec_c&L={z}&Y={y}&X={x}&tk=9c157e9585486c02edf817d2ecbc7752', | ||
| 73 | + wmtsurl: 'http://t0.tianditu.gov.cn/vec_c/wmts', | ||
| 74 | + layer:"vec", | ||
| 75 | + tileMatrixSet:"c", | ||
| 76 | + format:"tiles", | ||
| 77 | + token:"f5347cab4b28410a6e8ba5143e3d5a35", | ||
| 66 | 78 | ||
| 67 | 79 | layerRaster: {}, | |
| 68 | 80 | sourceRaster: { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments