feat(junction): add reference geometry comparison layer
This commit is contained in:
1 parent
4519cad562
commit
92ab2edd96
11 files changed
+107
-5
No files matched your search
@@ -78,6 +78,7 @@ interface Props {
|
||||
junctionHotspots?: boolean;
|
||||
onJunctionHotspot?: (ref: JunctionRef, coordinate: Coordinate, descriptor: JunctionDescriptor) => void;
|
||||
junctionNodeMarkers?: Array<{ coordinate: Coordinate; label: string; selected: boolean }>;
|
||||
referenceOpacity?: number;
|
||||
}
|
||||
export function MapCanvas({
|
||||
state,
|
||||
@@ -114,6 +115,7 @@ export function MapCanvas({
|
||||
junctionHotspots = true,
|
||||
onJunctionHotspot,
|
||||
junctionNodeMarkers = [],
|
||||
referenceOpacity = 0.55,
|
||||
}: Props) {
|
||||
const target = useRef<HTMLDivElement>(null);
|
||||
const mapRef = useRef<Map | null>(null);
|
||||
@@ -611,5 +613,8 @@ export function MapCanvas({
|
||||
layers.native.changed();
|
||||
layers.sidewalks.changed();
|
||||
}, [visible, scene]);
|
||||
useEffect(() => {
|
||||
layersRef.current?.reference.setOpacity(referenceOpacity);
|
||||
}, [referenceOpacity]);
|
||||
return <div className="map" ref={target} aria-label="道路地图" />;
|
||||
}
|
||||
Reference in new issue
Block a user