Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-baidu-map 实现地图找房功能,但是出现bm-overlay的@click事件,第一次点击可以设置zoom,第二次点击zoom数值变了,但地图没缩小 #1044

Open
WDDLXWJJ opened this issue Jun 7, 2024 · 2 comments

Comments

@WDDLXWJJ
Copy link

WDDLXWJJ commented Jun 7, 2024

No description provided.

@WDDLXWJJ
Copy link
Author

WDDLXWJJ commented Jun 7, 2024

如题,zoom数值确实会变化,第一次点击会地图会缩小,但是后续点击同一个bm-overlay组件时地图却不能缩小

@WDDLXWJJ
Copy link
Author

WDDLXWJJ commented Jun 7, 2024

`<baidu-map
id="bm-view"
class="bm-view"
:center="center"
:zoom="zoom"
:scroll-wheel-zoom="true"
@ready="handler"
:min-zoom="minZoom"
:max-zoom="maxZoom"
@zoomend="handleZoomEnd"
@moveend="handleMoveEnd"
ref="bdmap"

<div v-if="!isZonePoints">
  <fatherZoneGeoPoints
    v-for="(item, index) in fatherZoneGeoPoints"
    :key="index"
    :zonePointInfo="item"
    @click.native="selZone(item, index)"
  ></fatherZoneGeoPoints>
</div>
<div v-if="isZonePoints">
  <sonZoneGeoPoints
    v-for="(item,index) in sonZoneGeoPoints"
    :key="index"
    :position="item.position"
    :zonePointInfo="item"
    @click.native="doViewAccountInfoList(item, index)"
  ></sonZoneGeoPoints>
</div>
methods: { selZone(item, index) { this.isZonePoints = true; this.$set(this.center, "lng", item.position.lng); this.$set(this.center, "lat", item.position.lat); this.zoom = this.boundaryZoom; //获取坐标信息(略) }, }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant