map-ol-utils 0.1.4 → 0.1.5
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 +5 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -642,7 +642,7 @@ var import_layer = require("ol/layer");
|
|
|
642
642
|
var import_WMTS = __toESM(require("ol/tilegrid/WMTS"), 1);
|
|
643
643
|
var createBaseLayer = (isDark = true) => {
|
|
644
644
|
return new import_layer.Tile({
|
|
645
|
-
zIndex:
|
|
645
|
+
zIndex: -5,
|
|
646
646
|
minZoom: 8,
|
|
647
647
|
maxZoom: 21,
|
|
648
648
|
source: new import_source.XYZ({
|
|
@@ -693,7 +693,7 @@ var createMapWorldLayer = (layerName, tk = "c77eddc667c5bed016fded560baf93e7") =
|
|
|
693
693
|
const [name, matrixSet] = layerName.split("_");
|
|
694
694
|
return new import_layer.Tile({
|
|
695
695
|
cacheSize: 20240,
|
|
696
|
-
zIndex: -
|
|
696
|
+
zIndex: -10,
|
|
697
697
|
source: new import_source2.WMTS({
|
|
698
698
|
crossOrigin: "anonymous",
|
|
699
699
|
projection: "EPSG:4326",
|
|
@@ -839,6 +839,9 @@ var disposeMap = (mapInstance = instance) => {
|
|
|
839
839
|
});
|
|
840
840
|
mapInstance.setTarget("");
|
|
841
841
|
mapInstance.dispose();
|
|
842
|
+
if (!mapInstance) {
|
|
843
|
+
instance = void 0;
|
|
844
|
+
}
|
|
842
845
|
mapInstance = void 0;
|
|
843
846
|
};
|
|
844
847
|
var getMapInstance = () => instance;
|
package/dist/index.js
CHANGED
|
@@ -576,7 +576,7 @@ import { Tile } from "ol/layer";
|
|
|
576
576
|
import WMTSTileGrid from "ol/tilegrid/WMTS";
|
|
577
577
|
var createBaseLayer = (isDark = true) => {
|
|
578
578
|
return new Tile({
|
|
579
|
-
zIndex:
|
|
579
|
+
zIndex: -5,
|
|
580
580
|
minZoom: 8,
|
|
581
581
|
maxZoom: 21,
|
|
582
582
|
source: new XYZ({
|
|
@@ -627,7 +627,7 @@ var createMapWorldLayer = (layerName, tk = "c77eddc667c5bed016fded560baf93e7") =
|
|
|
627
627
|
const [name, matrixSet] = layerName.split("_");
|
|
628
628
|
return new Tile({
|
|
629
629
|
cacheSize: 20240,
|
|
630
|
-
zIndex: -
|
|
630
|
+
zIndex: -10,
|
|
631
631
|
source: new WMTS({
|
|
632
632
|
crossOrigin: "anonymous",
|
|
633
633
|
projection: "EPSG:4326",
|
|
@@ -773,6 +773,9 @@ var disposeMap = (mapInstance = instance) => {
|
|
|
773
773
|
});
|
|
774
774
|
mapInstance.setTarget("");
|
|
775
775
|
mapInstance.dispose();
|
|
776
|
+
if (!mapInstance) {
|
|
777
|
+
instance = void 0;
|
|
778
|
+
}
|
|
776
779
|
mapInstance = void 0;
|
|
777
780
|
};
|
|
778
781
|
var getMapInstance = () => instance;
|