修改 地图显示逻辑
This commit is contained in:
@@ -45,14 +45,16 @@
|
||||
<bm-map-type :map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
|
||||
anchor='BMAP_ANCHOR_TOP_RIGHT'></bm-map-type>
|
||||
<!-- 线-->
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
<div v-if='zoom > 13'>
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
</div>
|
||||
<!-- 变电站-->
|
||||
<template v-if='zoom > 12'>
|
||||
<template v-if='zoom > 13'>
|
||||
<bm-marker :position='path' v-for='path in siteList' :key='path.subId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
</template>
|
||||
<!-- 点 -->
|
||||
<BmlMarkerClusterer>
|
||||
<BmlMarkerClusterer maxZoom='12'>
|
||||
<bm-marker :position='path' v-for='path in areaLineInfo' :key='path.lineId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
</BmlMarkerClusterer>
|
||||
@@ -145,7 +147,7 @@ const handler = async ({ BMap, map }: any) => {
|
||||
params.value.searchEndTime = datePickerRef.value.timeValue[1]
|
||||
let { data } = await getAreaLineInfo(params.value)
|
||||
let r = 0.0035
|
||||
let list= data.filter((item: any) => item.lng != 0)
|
||||
let list = data.filter((item: any) => item.lng != 0)
|
||||
list.forEach((item: any) => {
|
||||
// 变电站图标
|
||||
item.icon = {
|
||||
|
||||
@@ -73,9 +73,12 @@
|
||||
anchor='BMAP_ANCHOR_TOP_RIGHT'
|
||||
></bm-map-type>
|
||||
<!-- 线-->
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
<div v-if='zoom > 13'>
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
|
||||
</div>
|
||||
<!-- 变电站-->
|
||||
<template v-if='zoom > 12'>
|
||||
<template v-if='zoom > 13'>
|
||||
<bm-marker
|
||||
:position='path'
|
||||
v-for='path in siteList'
|
||||
@@ -85,7 +88,7 @@
|
||||
></bm-marker>
|
||||
</template>
|
||||
<!-- 点 -->
|
||||
<BmlMarkerClusterer>
|
||||
<BmlMarkerClusterer maxZoom='12'>
|
||||
<bm-marker
|
||||
:position='path'
|
||||
v-for='path in areaLineInfo'
|
||||
|
||||
Reference in New Issue
Block a user