Commit c31108f2 authored by shilei's avatar shilei

地图初始化展示所有点

parent ea2037d5
......@@ -18,16 +18,19 @@
{{ item.showName || item.name }}
</view>
<view class="type-item-icon">
<u-icon v-if="selectIndex == index || item.showName" name="arrow-up" color="#4374EF" size="20"></u-icon>
<u-icon v-else name="arrow-down" color="#B5B5B5" size="20"></u-icon>
<!-- <image
v-if="selectIndex == index || item.showName"
class="type-item-icon-img"
src="/static/dropDown/icon_up.png"
></image> -->
<image
<!-- <image
v-else
class="type-item-icon-img"
src="/static/dropDown/icon_down.png"
></image>
></image> -->
</view>
</view>
</view>
......
......@@ -96,7 +96,7 @@
</u-empty>
</view>
<div v-else class="content z-100" :class="{'no-filter': activeBar === 1}" style="padding-top: 246rpx;">
<map id="mapId" :polygons="polygons" @markertap="handleMarkerClick" @callouttap="handleMarkerClick" :scale='10' style="width: 100%;height: calc(100vh - 246rpx)" latitude="31.464086" longitude="116.944909" class="map" :markers="markers">
<map id="mapId" :include-points="points" :polygons="polygons" @markertap="handleMarkerClick" @callouttap="handleMarkerClick" :scale='10' style="width: 100%;height: calc(100vh - 246rpx)" latitude="31.464086" longitude="116.944909" class="map" :markers="markers">
</map>
<div v-if="activeInfo.id" :key="activeInfo.id" @click="toDetail(activeInfo)" style="position: fixed;padding: 0 30rpx;bottom: 30rpx;width: 100vw;z-index: 999;box-sizing: border-box;">
<park-card-vue :key="activeInfo.id" :key-words="keyWords" :detail="activeInfo" v-if="activeBar == 0"></park-card-vue>
......@@ -211,7 +211,8 @@ export default {
searchKey: '',
keyWords: '',
mode: 'list',
activeInfo: {}
activeInfo: {},
points: [] // 所有标记点坐标集合
};
},
mounted() {
......@@ -382,6 +383,7 @@ export default {
},
markers() {
let temp = [];
this.points = []
this.dataList.forEach((item,index) => {
temp.push({
id: item.id,
......@@ -400,6 +402,10 @@ export default {
bgColor: '#4374EF'
}
})
this.points.push({
latitude: item.latitude,
longitude: item.longitude
})
})
return temp || []
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment