|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
AMap: null,
|
|
|
map: null,
|
|
|
infoWindow: null,
|
|
|
- trafficLayer: null,
|
|
|
+
|
|
|
routeGroups: {},
|
|
|
polylines: [],
|
|
|
privateStyle: {
|
|
|
@@ -308,7 +308,6 @@ export default {
|
|
|
this.map.on('complete', () => {
|
|
|
if (!this._isDestroyed) {
|
|
|
this.drawStaticRoutes();
|
|
|
- this.enableTrafficLayer();
|
|
|
}
|
|
|
});
|
|
|
} catch (err) {
|
|
|
@@ -316,14 +315,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- enableTrafficLayer() {
|
|
|
- if (!this.isMapReady() || !this.AMap.TileLayer) return;
|
|
|
- this.trafficLayer = new this.AMap.TileLayer.Traffic({
|
|
|
- zIndex: 10,
|
|
|
- autoRefresh: true
|
|
|
- });
|
|
|
- this.map.add(this.trafficLayer);
|
|
|
- },
|
|
|
+
|
|
|
|
|
|
drawStaticRoutes() {
|
|
|
if (!this.isMapReady()) return;
|