map-ol-utils 0.1.18 → 0.1.19

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/dist/index.cjs CHANGED
@@ -733,7 +733,7 @@ var import_source2 = require("ol/source");
733
733
  var import_tilegrid = require("ol/tilegrid");
734
734
  var import_layer = require("ol/layer");
735
735
  var import_WMTS = __toESM(require("ol/tilegrid/WMTS"), 1);
736
- var createBaseLayer = (isDark = true) => {
736
+ var createBaseLayer = (layerName = "hzsyvector_dark") => {
737
737
  return new import_layer.Tile({
738
738
  zIndex: -5,
739
739
  minZoom: 8,
@@ -765,16 +765,11 @@ var createBaseLayer = (isDark = true) => {
765
765
  ]
766
766
  }),
767
767
  projection: "EPSG:4326",
768
- urls: isDark ? [
769
- "https://ywtg.citybrain.hangzhou.gov.cn:9456/hzsyvector_dark/{z}/{y}/{x}",
770
- "https://ywtg.citybrain.hangzhou.gov.cn:9457/hzsyvector_dark/{z}/{y}/{x}",
771
- "https://ywtg.citybrain.hangzhou.gov.cn:9458/hzsyvector_dark/{z}/{y}/{x}",
772
- "https://ywtg.citybrain.hangzhou.gov.cn:9459/hzsyvector_dark/{z}/{y}/{x}"
773
- ] : [
774
- "https://ywtg.citybrain.hangzhou.gov.cn:9456/hzsyvector/{z}/{y}/{x}",
775
- "https://ywtg.citybrain.hangzhou.gov.cn:9457/hzsyvector/{z}/{y}/{x}",
776
- "https://ywtg.citybrain.hangzhou.gov.cn:9458/hzsyvector/{z}/{y}/{x}",
777
- "https://ywtg.citybrain.hangzhou.gov.cn:9459/hzsyvector/{z}/{y}/{x}"
768
+ urls: [
769
+ `https://ywtg.citybrain.hangzhou.gov.cn:9456/${layerName}/{z}/{y}/{x}`,
770
+ `https://ywtg.citybrain.hangzhou.gov.cn:9457/${layerName}/{z}/{y}/{x}`,
771
+ `https://ywtg.citybrain.hangzhou.gov.cn:9458/${layerName}/{z}/{y}/{x}`,
772
+ `https://ywtg.citybrain.hangzhou.gov.cn:9459/${layerName}/{z}/{y}/{x}`
778
773
  ]
779
774
  }),
780
775
  properties: {
package/dist/index.d.cts CHANGED
@@ -123,9 +123,9 @@ declare const createWmtsLayer: (serverUrl: string) => (config: WmtsSourceOptions
123
123
 
124
124
  /**
125
125
  * 创建杭州规自地图
126
- * @param isDark
126
+ * @param layerName
127
127
  */
128
- declare const createBaseLayer: (isDark?: boolean) => Tile<XYZ>;
128
+ declare const createBaseLayer: (layerName?: string) => Tile<XYZ>;
129
129
  /**
130
130
  * 创建天地图
131
131
  * @param layerName - 图层名称
package/dist/index.d.ts CHANGED
@@ -123,9 +123,9 @@ declare const createWmtsLayer: (serverUrl: string) => (config: WmtsSourceOptions
123
123
 
124
124
  /**
125
125
  * 创建杭州规自地图
126
- * @param isDark
126
+ * @param layerName
127
127
  */
128
- declare const createBaseLayer: (isDark?: boolean) => Tile<XYZ>;
128
+ declare const createBaseLayer: (layerName?: string) => Tile<XYZ>;
129
129
  /**
130
130
  * 创建天地图
131
131
  * @param layerName - 图层名称
package/dist/index.js CHANGED
@@ -672,7 +672,7 @@ import { WMTS } from "ol/source";
672
672
  import { TileGrid } from "ol/tilegrid";
673
673
  import { Tile } from "ol/layer";
674
674
  import WMTSTileGrid from "ol/tilegrid/WMTS";
675
- var createBaseLayer = (isDark = true) => {
675
+ var createBaseLayer = (layerName = "hzsyvector_dark") => {
676
676
  return new Tile({
677
677
  zIndex: -5,
678
678
  minZoom: 8,
@@ -704,16 +704,11 @@ var createBaseLayer = (isDark = true) => {
704
704
  ]
705
705
  }),
706
706
  projection: "EPSG:4326",
707
- urls: isDark ? [
708
- "https://ywtg.citybrain.hangzhou.gov.cn:9456/hzsyvector_dark/{z}/{y}/{x}",
709
- "https://ywtg.citybrain.hangzhou.gov.cn:9457/hzsyvector_dark/{z}/{y}/{x}",
710
- "https://ywtg.citybrain.hangzhou.gov.cn:9458/hzsyvector_dark/{z}/{y}/{x}",
711
- "https://ywtg.citybrain.hangzhou.gov.cn:9459/hzsyvector_dark/{z}/{y}/{x}"
712
- ] : [
713
- "https://ywtg.citybrain.hangzhou.gov.cn:9456/hzsyvector/{z}/{y}/{x}",
714
- "https://ywtg.citybrain.hangzhou.gov.cn:9457/hzsyvector/{z}/{y}/{x}",
715
- "https://ywtg.citybrain.hangzhou.gov.cn:9458/hzsyvector/{z}/{y}/{x}",
716
- "https://ywtg.citybrain.hangzhou.gov.cn:9459/hzsyvector/{z}/{y}/{x}"
707
+ urls: [
708
+ `https://ywtg.citybrain.hangzhou.gov.cn:9456/${layerName}/{z}/{y}/{x}`,
709
+ `https://ywtg.citybrain.hangzhou.gov.cn:9457/${layerName}/{z}/{y}/{x}`,
710
+ `https://ywtg.citybrain.hangzhou.gov.cn:9458/${layerName}/{z}/{y}/{x}`,
711
+ `https://ywtg.citybrain.hangzhou.gov.cn:9459/${layerName}/{z}/{y}/{x}`
717
712
  ]
718
713
  }),
719
714
  properties: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "map-ol-utils",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [