Commit c31108f2 authored by shilei's avatar shilei

地图初始化展示所有点

parent ea2037d5
...@@ -18,16 +18,19 @@ ...@@ -18,16 +18,19 @@
{{ item.showName || item.name }} {{ item.showName || item.name }}
</view> </view>
<view class="type-item-icon"> <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 <!-- <image
v-if="selectIndex == index || item.showName" v-if="selectIndex == index || item.showName"
class="type-item-icon-img" class="type-item-icon-img"
src="/static/dropDown/icon_up.png" src="/static/dropDown/icon_up.png"
></image> --> ></image> -->
<image <!-- <image
v-else
class="type-item-icon-img" class="type-item-icon-img"
src="/static/dropDown/icon_down.png" src="/static/dropDown/icon_down.png"
></image> ></image> -->
</view> </view>
</view> </view>
</view> </view>
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</u-empty> </u-empty>
</view> </view>
<div v-else class="content z-100" :class="{'no-filter': activeBar === 1}" style="padding-top: 246rpx;"> <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> </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;"> <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> <park-card-vue :key="activeInfo.id" :key-words="keyWords" :detail="activeInfo" v-if="activeBar == 0"></park-card-vue>
...@@ -211,7 +211,8 @@ export default { ...@@ -211,7 +211,8 @@ export default {
searchKey: '', searchKey: '',
keyWords: '', keyWords: '',
mode: 'list', mode: 'list',
activeInfo: {} activeInfo: {},
points: [] // 所有标记点坐标集合
}; };
}, },
mounted() { mounted() {
...@@ -382,6 +383,7 @@ export default { ...@@ -382,6 +383,7 @@ export default {
}, },
markers() { markers() {
let temp = []; let temp = [];
this.points = []
this.dataList.forEach((item,index) => { this.dataList.forEach((item,index) => {
temp.push({ temp.push({
id: item.id, id: item.id,
...@@ -400,6 +402,10 @@ export default { ...@@ -400,6 +402,10 @@ export default {
bgColor: '#4374EF' bgColor: '#4374EF'
} }
}) })
this.points.push({
latitude: item.latitude,
longitude: item.longitude
})
}) })
return temp || [] 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