|
@@ -2,12 +2,10 @@
|
2
|
2
|
<div class="context" >
|
3
|
3
|
<vue-headful title="周边配套" />
|
4
|
4
|
<!-- <div class="mapId">
|
5
|
|
- <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" id='mapcointainer' vid="amapDemo" >
|
6
|
|
- <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
|
7
|
|
- </el-amap>
|
|
5
|
+ <el-amap vid="amapDemo" :zoom="zoom" :center="center" id='mapcointainer'></el-amap>
|
8
|
6
|
</div> -->
|
9
|
7
|
<div class="mapId">
|
10
|
|
- <div id='mapcointainer'></div>
|
|
8
|
+ <div id="mapcointainer"></div>
|
11
|
9
|
</div>
|
12
|
10
|
<van-row class="user-links">
|
13
|
11
|
<van-col span="6" >
|
|
@@ -40,7 +38,8 @@
|
40
|
38
|
</template>
|
41
|
39
|
|
42
|
40
|
<script>
|
43
|
|
-import { lazyAmapApiLoaderInstanse } from "vue-amap";
|
|
41
|
+
|
|
42
|
+// import { lazyAmapApiLoaderInstanse } from "vue-amap";
|
44
|
43
|
|
45
|
44
|
let map;
|
46
|
45
|
let routerParams;
|
|
@@ -50,7 +49,7 @@ export default {
|
50
|
49
|
data(){
|
51
|
50
|
return{
|
52
|
51
|
keyword:String,
|
53
|
|
- shows:false
|
|
52
|
+ shows:false,
|
54
|
53
|
}
|
55
|
54
|
},
|
56
|
55
|
components: {
|
|
@@ -84,13 +83,13 @@ export default {
|
84
|
83
|
});
|
85
|
84
|
this.searchAround(routerParams.tag);
|
86
|
85
|
if(routerParams.tag=="学校"){
|
87
|
|
- this.shows = 1;
|
|
86
|
+ this.shows = 1;
|
88
|
87
|
}else if(routerParams.tag=="医院"){
|
89
|
|
- this.shows = 2;
|
|
88
|
+ this.shows = 2;
|
90
|
89
|
}else if(routerParams.tag=="交通"){
|
91
|
|
- this.shows = 3;
|
|
90
|
+ this.shows = 3;
|
92
|
91
|
}else if(routerParams.tag=="商业"){
|
93
|
|
- this.shows = 4;
|
|
92
|
+ this.shows = 4;
|
94
|
93
|
}
|
95
|
94
|
},
|
96
|
95
|
|
|
@@ -118,14 +117,14 @@ export default {
|
118
|
117
|
});
|
119
|
118
|
AMap.plugin(['AMap.ToolBar','AMap.Scale'],
|
120
|
119
|
()=>{
|
121
|
|
- map.addControl(new AMap.ToolBar());
|
122
|
|
- map.addControl(new AMap.Scale());
|
|
120
|
+ map.addControl(new AMap.ToolBar());
|
|
121
|
+ map.addControl(new AMap.Scale());
|
123
|
122
|
});
|
124
|
|
- marker = new AMap.Marker({
|
125
|
|
- position: [routerParams.lng, routerParams.lat],
|
126
|
|
- title: "routerParams.buildingname",
|
127
|
|
- map: map
|
128
|
|
- });
|
|
123
|
+ // marker = new AMap.Marker({
|
|
124
|
+ // position: [routerParams.lng, routerParams.lat],
|
|
125
|
+ // title: "routerParams.buildingname",
|
|
126
|
+ // map: map
|
|
127
|
+ // });
|
129
|
128
|
this.searchAround(val);
|
130
|
129
|
if(val=="学校"){
|
131
|
130
|
this.shows = 1;
|