map-ol-utils 0.1.7 → 0.1.8
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 +8 -6
- package/dist/index.js +8 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -843,12 +843,14 @@ var disposeMap = () => {
|
|
|
843
843
|
};
|
|
844
844
|
var getMapInstance = () => instance;
|
|
845
845
|
var resetZoomAndCenter = (center = mapCenter) => {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
846
|
+
if (instance) {
|
|
847
|
+
const view = instance.getView();
|
|
848
|
+
view.animate({
|
|
849
|
+
zoom: 9.4,
|
|
850
|
+
center,
|
|
851
|
+
duration: 1e3
|
|
852
|
+
});
|
|
853
|
+
}
|
|
852
854
|
};
|
|
853
855
|
var resetMap = (config = { center: mapCenter, isClearAll: true }) => {
|
|
854
856
|
removeAllLayers();
|
package/dist/index.js
CHANGED
|
@@ -777,12 +777,14 @@ var disposeMap = () => {
|
|
|
777
777
|
};
|
|
778
778
|
var getMapInstance = () => instance;
|
|
779
779
|
var resetZoomAndCenter = (center = mapCenter) => {
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
780
|
+
if (instance) {
|
|
781
|
+
const view = instance.getView();
|
|
782
|
+
view.animate({
|
|
783
|
+
zoom: 9.4,
|
|
784
|
+
center,
|
|
785
|
+
duration: 1e3
|
|
786
|
+
});
|
|
787
|
+
}
|
|
786
788
|
};
|
|
787
789
|
var resetMap = (config = { center: mapCenter, isClearAll: true }) => {
|
|
788
790
|
removeAllLayers();
|