| | |
| | | String obstacles, |
| | | String plannedPath, |
| | | Runnable returnAction) { |
| | | if (mapRenderer == null || !isMeaningfulValue(plannedPath)) { |
| | | if (mapRenderer == null) { |
| | | return false; |
| | | } |
| | | // 允许没有路径的预览(例如障碍物预览),只要有返回回调即可 |
| | | if (!isMeaningfulValue(plannedPath) && returnAction == null) { |
| | | return false; |
| | | } |
| | | |
| | |
| | | |
| | | mapRenderer.setCurrentBoundary(boundary, landNumber, landName); |
| | | mapRenderer.setCurrentObstacles(obstacles, landNumber); |
| | | mapRenderer.setCurrentPlannedPath(plannedPath); |
| | | // 只有在有路径时才设置路径 |
| | | if (isMeaningfulValue(plannedPath)) { |
| | | mapRenderer.setCurrentPlannedPath(plannedPath); |
| | | } else { |
| | | mapRenderer.setCurrentPlannedPath(null); |
| | | } |
| | | mapRenderer.clearHandheldBoundaryPreview(); |
| | | mapRenderer.setBoundaryPointSizeScale(1.0d); |
| | | mapRenderer.setBoundaryPointsVisible(isMeaningfulValue(boundary)); |
| | | // 启用障碍物边界点显示 |
| | | mapRenderer.setObstaclePointsVisible(isMeaningfulValue(obstacles)); |
| | | |
| | | String displayName = isMeaningfulValue(landName) ? landName : landNumber; |
| | | updateCurrentAreaName(displayName); |