@vtx/map 1.1.42 → 1.1.44
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/lib/VtxMap/AMap/AMap.js
CHANGED
|
@@ -676,7 +676,7 @@ var VortexAMap = /*#__PURE__*/function (_React$Component) {
|
|
|
676
676
|
}, {
|
|
677
677
|
key: "setMapType",
|
|
678
678
|
value: function setMapType(type) {
|
|
679
|
-
if (!this.satellite) {
|
|
679
|
+
if (!this.satellite && type == 'wx') {
|
|
680
680
|
this.satellite = new AMap.TileLayer.Satellite({
|
|
681
681
|
map: this.state.gis
|
|
682
682
|
});
|
|
@@ -685,16 +685,18 @@ var VortexAMap = /*#__PURE__*/function (_React$Component) {
|
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
688
|
+
if (this.satellite) {
|
|
689
|
+
switch (type) {
|
|
690
|
+
case 'sl':
|
|
691
|
+
this.satellite.hide();
|
|
692
|
+
this.roadNet.hide();
|
|
693
|
+
break;
|
|
693
694
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
695
|
+
case 'wx':
|
|
696
|
+
this.satellite.show();
|
|
697
|
+
this.roadNet.show();
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
698
700
|
}
|
|
699
701
|
} //增加图片图层
|
|
700
702
|
|