v-ol-map 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # v-ol-map
2
+
3
+ > 一个基于[OpenLayers](https://openlayers.org/) 的vue组件
4
+
5
+ ## 已实现
6
+
7
+ - 地图 [v-map](https://pp129.github.io/vue-openlayers-map/MAP.html)
8
+ - 视图 [view](https://pp129.github.io/vue-openlayers-map/MAP.html#view)
9
+ - 地图控件 [controls](https://pp129.github.io/vue-openlayers-map/MAP.html#controls)
10
+ - 地图交互 [interactions](https://pp129.github.io/vue-openlayers-map/MAP.html#interactions)
11
+ - 事件 [events](https://pp129.github.io/vue-openlayers-map/MAP.html#events)
12
+ - 可调用方法 [methods](https://pp129.github.io/vue-openlayers-map/MAP.html#methods)
13
+ - 鹰眼 [v-overview](https://pp129.github.io/vue-openlayers-map/OVERVIEW.html)
14
+ - 图层
15
+ - 矢量图层 [v-vector](https://pp129.github.io/vue-openlayers-map/VECTORLAYER.html)
16
+ - 编辑 [modify](https://pp129.github.io/vue-openlayers-map/VECTORLAYER.html#modify)
17
+ - 瓦片图层 [v-tile](https://pp129.github.io/vue-openlayers-map/TILELAYER.html)
18
+ - 热力图 [v-heatmap](https://pp129.github.io/vue-openlayers-map/HEATMAPLAYER.html)
19
+ - 聚合图层 [v-cluster](https://pp129.github.io/vue-openlayers-map/CLUSTERLAYER.html)
20
+ - 图形图层 [v-graphic](https://pp129.github.io/vue-openlayers-map/GRAPHICLAYER.html)
21
+ - 路径规划图层 [v-route](https://pp129.github.io/vue-openlayers-map/ROUTELAYER.html)
22
+ - 弹框 [v-overlay](https://pp129.github.io/vue-openlayers-map/OVERLAY.html)
23
+ - 轨迹动画 [v-track](https://pp129.github.io/vue-openlayers-map/TRACK.html)
24
+ - 绘制 [v-draw](https://pp129.github.io/vue-openlayers-map/DRAW.html)
25
+ - 测量 [v-measure](https://pp129.github.io/vue-openlayers-map/MEASURE.html)
26
+
27
+ ## docs
28
+
29
+ ### [文档](https://pp129.github.io/vue-openlayers-map/DEV.html)
30
+
31
+ ## demo
32
+
33
+ ### git clone
34
+
35
+ ```bash
36
+ //github
37
+ git clone https://github.com/pp129/vue-openlayers-map.git
38
+ //gitee
39
+ git clone https://gitee.com/ayos-team/vue-openlayers-map.git
40
+ ```
41
+
42
+ ### 运行
43
+ ```bash
44
+ npm run serve
45
+ ```
46
+ [live demo](https://vue-openlayers-map.netlify.app)
package/lib/ol-map.es.js CHANGED
@@ -25020,6 +25020,9 @@ const setConstrainResolution = (map, enabled) => {
25020
25020
  const setMaxZoom = (map, zoom) => {
25021
25021
  map.getView().setMaxZoom(zoom);
25022
25022
  };
25023
+ const setMinZoom = (map, zoom) => {
25024
+ map.getView().setMinZoom(zoom);
25025
+ };
25023
25026
  const exportPNG = (map, downLoadId) => {
25024
25027
  map.once("rendercomplete", function() {
25025
25028
  const mapCanvas = document.createElement("canvas");
@@ -25289,6 +25292,9 @@ class OlMap {
25289
25292
  static setMaxZoom(zoom) {
25290
25293
  return setMaxZoom(OlMap.map.map, zoom);
25291
25294
  }
25295
+ static setMinZoom(zoom) {
25296
+ return setMinZoom(OlMap.map.map, zoom);
25297
+ }
25292
25298
  static exportPNG(downLoadId) {
25293
25299
  return exportPNG(OlMap.map.map, downLoadId);
25294
25300
  }
@@ -25523,6 +25529,15 @@ const __vue2_script$c = {
25523
25529
  immediate: false,
25524
25530
  deep: true
25525
25531
  },
25532
+ "view.minZoom": {
25533
+ handler(value) {
25534
+ if (value) {
25535
+ this.setMinZoom(value);
25536
+ }
25537
+ },
25538
+ immediate: false,
25539
+ deep: true
25540
+ },
25526
25541
  "controls.zoom": {
25527
25542
  handler(value) {
25528
25543
  const zoom = OlMap.map.mapControlsZoom;
@@ -25642,6 +25657,9 @@ const __vue2_script$c = {
25642
25657
  setMaxZoom(zoom) {
25643
25658
  OlMap.setMaxZoom(zoom);
25644
25659
  },
25660
+ setMinZoom(zoom) {
25661
+ OlMap.setMinZoom(zoom);
25662
+ },
25645
25663
  setControl(controls, options) {
25646
25664
  OlMap.setControl(controls, options);
25647
25665
  },
@@ -28160,7 +28178,7 @@ const __vue2_script$a = {
28160
28178
  tileType: {
28161
28179
  type: String,
28162
28180
  default: "TD",
28163
- validator: (value) => ["TD", "TD_IMG", "XYZ", "BD", "GD", "OSM", "PGIS_TILE", "PGIS_HPYX", "WMS"].includes(value)
28181
+ validator: (value) => ["TD", "TD_IMG", "XYZ", "BD", "GD", "OSM", "WMS"].includes(value.toUpperCase())
28164
28182
  },
28165
28183
  tdVec: {
28166
28184
  type: String
@@ -28266,7 +28284,7 @@ const __vue2_script$a = {
28266
28284
  }
28267
28285
  },
28268
28286
  init() {
28269
- switch (this.tileType) {
28287
+ switch (this.tileType.toUpperCase()) {
28270
28288
  case "XYZ":
28271
28289
  this.initTileXYZ();
28272
28290
  break;