|
@@ -2,8 +2,8 @@
|
|
* @Description:
|
|
* @Description:
|
|
* @Author: wangcc
|
|
* @Author: wangcc
|
|
* @Date: 2022-10-19 09:32:46
|
|
* @Date: 2022-10-19 09:32:46
|
|
- * @LastEditors: wangcc
|
|
|
|
- * @LastEditTime: 2022-11-11 18:00:23
|
|
|
|
|
|
+ * @LastEditors: wangcc 1053578651@qq.com
|
|
|
|
+ * @LastEditTime: 2022-11-14 00:36:10
|
|
* @FilePath: \castgroup_bigscreen\src\components\amapPow.vue
|
|
* @FilePath: \castgroup_bigscreen\src\components\amapPow.vue
|
|
* @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved.
|
|
* @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved.
|
|
-->
|
|
-->
|
|
@@ -178,10 +178,23 @@ export default {
|
|
'$store.state.addr.selectStreet'(val) {
|
|
'$store.state.addr.selectStreet'(val) {
|
|
if (val.label && val.value && val.areaId) {
|
|
if (val.label && val.value && val.areaId) {
|
|
let _this = this;
|
|
let _this = this;
|
|
- this.map.remove(this.polygon);
|
|
|
|
let labelTown = val.label;
|
|
let labelTown = val.label;
|
|
- console.log(val);
|
|
|
|
- this.map.setCity(labelTown);
|
|
|
|
|
|
+ if (labelTown == '水尾乡') {
|
|
|
|
+ labelTown = '水尾水族乡'
|
|
|
|
+ }
|
|
|
|
+ AMap.plugin(['AMap.Autocomplete', 'AMap.PlaceSearch'], function () {
|
|
|
|
+ var placeSearch = new AMap.PlaceSearch({
|
|
|
|
+ // city 指定搜索所在城市,支持传入格式有:城市名、citycode和adcode
|
|
|
|
+ city: '贵州省',
|
|
|
|
+ });
|
|
|
|
+ placeSearch.search(labelTown, function (status, result) {
|
|
|
|
+ // 查询成功时,result即对应匹配的POI信息
|
|
|
|
+ if (status === 'complete') {
|
|
|
|
+ let center = [result.poiList.pois[0].location.lng, result.poiList.pois[0].location.lat]
|
|
|
|
+ _this.map.setZoomAndCenter(12, center, false, 12)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -740,7 +753,8 @@ export default {
|
|
'AMap.ToolBar',
|
|
'AMap.ToolBar',
|
|
'AMap.Driving',
|
|
'AMap.Driving',
|
|
'AMap.DistrictSearch',
|
|
'AMap.DistrictSearch',
|
|
- 'AMap.MapboxVectorTileLayer'
|
|
|
|
|
|
+ 'AMap.MapboxVectorTileLayer',
|
|
|
|
+ 'AMap.Autocomplete'
|
|
],
|
|
],
|
|
Loca: {
|
|
Loca: {
|
|
version: '2.0'
|
|
version: '2.0'
|
|
@@ -1290,6 +1304,7 @@ export default {
|
|
this.boundaryPolygon.on('click', (e) => {
|
|
this.boundaryPolygon.on('click', (e) => {
|
|
let centerLanLatArr = [e.lnglat.lng, e.lnglat.lat];
|
|
let centerLanLatArr = [e.lnglat.lng, e.lnglat.lat];
|
|
that.map.remove(that.townPolygons);
|
|
that.map.remove(that.townPolygons);
|
|
|
|
+ this.map.remove(this.polygon);
|
|
// that.districtExplorer.clearFeaturePolygons();
|
|
// that.districtExplorer.clearFeaturePolygons();
|
|
let valCode = element.properties.XIANG;
|
|
let valCode = element.properties.XIANG;
|
|
let areaId = '';
|
|
let areaId = '';
|
|
@@ -2208,20 +2223,17 @@ export default {
|
|
|
|
|
|
34% {
|
|
34% {
|
|
// opacity: 1;
|
|
// opacity: 1;
|
|
- transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1)
|
|
|
|
- translate3d(34vw, 0px, 0px);
|
|
|
|
|
|
+ transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1) translate3d(34vw, 0px, 0px);
|
|
}
|
|
}
|
|
|
|
|
|
67% {
|
|
67% {
|
|
// opacity: 1;
|
|
// opacity: 1;
|
|
- transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1)
|
|
|
|
- translate3d(67vw, 0px, 0px);
|
|
|
|
|
|
+ transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1) translate3d(67vw, 0px, 0px);
|
|
}
|
|
}
|
|
|
|
|
|
100% {
|
|
100% {
|
|
// opacity: 0;
|
|
// opacity: 0;
|
|
- transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1)
|
|
|
|
- translate3d(160vw, 0px, 0px);
|
|
|
|
|
|
+ transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scaleX(1) scaleY(1) translate3d(160vw, 0px, 0px);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|