重整多余的UI组件和未定功能的逻辑链路的修正
This commit is contained in:
@@ -434,7 +434,9 @@ class PathPlanningWorkGateway
|
||||
if (node is! Map) return null;
|
||||
final lat = node['lat'] ?? node['latitude'];
|
||||
final lng = node['lng'] ?? node['lon'] ?? node['longitude'];
|
||||
if (lat is! num || lng is! num) return null;
|
||||
if (lat is! num || lng is! num ||
|
||||
!lat.isFinite || !lng.isFinite ||
|
||||
lat < -90 || lat > 90 || lng < -180 || lng > 180) return null;
|
||||
return LatLng(lat.toDouble(), lng.toDouble());
|
||||
}
|
||||
|
||||
@@ -485,6 +487,7 @@ class PathPlanningWorkGateway
|
||||
ReturnObstaclePoint(
|
||||
center: center,
|
||||
alias: (e['alias'] ?? e['name'] ?? '').toString(),
|
||||
shapeType: (e['shapeType'] ?? 'rect').toString(),
|
||||
sizeX: asSize(e['size_x'] ?? e['sizeX'] ?? e['width']),
|
||||
sizeY: asSize(e['size_y'] ?? e['sizeY'] ?? e['height']),
|
||||
source: (e['source'] ?? 'platform').toString(),
|
||||
|
||||
Reference in New Issue
Block a user