Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/H5/xp-robotaxi-miniprogram into dev
| | |
| | | const nearestCandidates = sites.length > 0 ? sites : newMarkers; |
| | | const { targetMarker, minDistance } = findNearestMarker(lat, lng, nearestCandidates); |
| | | |
| | | // 只有用户手势拖动触发的移动才进行吸附判断,避免 moveToLocation 触发死循环 |
| | | if ((causedBy === 'gesture' || causedBy === 'drag' || causedBy === 'scale') && targetMarker && minDistance < adsorptionDistance) { |
| | | // 只有用户手势拖动触发的移动才进行吸附判断 |
| | | if ((causedBy === 'gesture' || causedBy === 'drag') && targetMarker && minDistance < adsorptionDistance) { |
| | | // 使用 moveToLocation 实现吸附效果 |
| | | mapCtx.moveToLocation({ |
| | | latitude: targetMarker.latitude, |