Adding context properties to OL features.
This commit is contained in:
1 parent
91916fca88
commit
b14db11938
5 files changed
+76
-20
No files matched your search
@@ -19,8 +19,9 @@ import VectorSource from 'ol/source/Vector';
|
||||
interface Props {
|
||||
trkId: string;
|
||||
vectorSource: VectorSource;
|
||||
context: any;
|
||||
}
|
||||
export const Trk: Component<Props> = ({ vectorSource, trkId }) => {
|
||||
export const Trk: Component<Props> = ({ vectorSource, trkId, context }) => {
|
||||
const [trk, setTrk] = createSignal<Trk>();
|
||||
const [dispatchId, setDispatchId] = createSignal<number>(-1);
|
||||
|
||||
@@ -70,7 +71,11 @@ export const Trk: Component<Props> = ({ vectorSource, trkId }) => {
|
||||
console.log({ caller: 'Trk / loop', trksegId });
|
||||
return (
|
||||
<Suspense>
|
||||
<Trkseg vectorSource={vectorSource} trksegId={trksegId} />
|
||||
<Trkseg
|
||||
vectorSource={vectorSource}
|
||||
trksegId={trksegId}
|
||||
context={{ ...context, trk, trkId }}
|
||||
/>
|
||||
</Suspense>
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user