ai-coding
2026-06-30 8aacd7c875f110cb7224ccc87972458b572fe7c0
fix(simulator): 修复目的地页 map ID 相同导致的问题

Co-Authored-By: 卢春龙 <lucl@xiaopeng.com>
2个文件已修改
12 ■■■■■ 已修改文件
src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/select-map-site/components/select-map-site-view.tsx
@@ -71,7 +71,7 @@
  return (
    <View className="home-container">
      <Map
        id="map"
        id="select-site-map"
        longitude={deps.longitude}
        latitude={deps.latitude}
        scale={deps.mapScale}
src/robotaxi/pages/select-map-site/hooks/use-select-map-site.ts
@@ -459,7 +459,7 @@
   * 返回当前位置并重新吸附最近站点。
   */
  const toOrigin = () => {
    const mapCtx = Taro.createMapContext('map');
    const mapCtx = Taro.createMapContext('select-site-map');
    mapCtx.moveToLocation({
      success: () => {
        handleRegionChange({ type: 'end', causedBy: 'gesture' });
@@ -476,7 +476,7 @@
      Taro.showToast({ title: '暂无可选运营区域', icon: 'none' });
      return;
    }
    const mapCtx = Taro.createMapContext('map');
    const mapCtx = Taro.createMapContext('select-site-map');
    mapCtx.includePoints({
      points,
      padding: INCLUDE_POINTS_PADDING
@@ -496,7 +496,7 @@
    if (type !== 'end') return;
    state.setBounce(true);
    const mapCtx = Taro.createMapContext('map');
    const mapCtx = Taro.createMapContext('select-site-map');
    // 获取真实的缩放等级并通过回调传递出去,彻底阻断与 mapScale 状态的绑定,避免触发原生组件抖动
    mapCtx.getScale({
      success: (res) => {
@@ -600,7 +600,7 @@
    state.setLatitude(site.latitude);
    state.setLongitude(site.longitude);
    syncPinLocation(site.latitude, site.longitude);
    const mapCtx = Taro.createMapContext('map');
    const mapCtx = Taro.createMapContext('select-site-map');
    mapCtx.moveToLocation({
      latitude: site.latitude,
      longitude: site.longitude,
@@ -874,7 +874,7 @@
            updateMapData(lat, lng).then(({ isInside, electronicAreaId }) => {
              state.setRangeStatus(getRangeStatus(isInside, {}, electronicAreaId));
            });
            const mapCtx = Taro.createMapContext('map');
            const mapCtx = Taro.createMapContext('select-site-map');
            const points = extractPointsFromPolygons(newPolygons);
            mapCtx.includePoints({
              points,