<Trkseg> component
This commit is contained in:
1 parent
54f2ab06d9
commit
ab7374f360
4 files changed
+61
-5
No files matched your search
@@ -1,11 +1,11 @@
|
||||
import { Component, createEffect, createResource } from 'solid-js';
|
||||
import { Component, createEffect, createResource, For } from 'solid-js';
|
||||
|
||||
import OlMap from 'ol/Map';
|
||||
|
||||
import dispatch from '../../workers/dispatcher-main';
|
||||
import getUri from '../../lib/ids';
|
||||
|
||||
//import Trkseg from './Trkseg';
|
||||
import Trkseg from '../trkseg';
|
||||
|
||||
interface Props {
|
||||
trkId: string;
|
||||
@@ -27,7 +27,15 @@ export const Trk: Component<Props> = ({ map, trkId }) => {
|
||||
console.log({ caller: 'Trk', map: map(), trkId, trk: trk() });
|
||||
});
|
||||
|
||||
return <></>;
|
||||
return (
|
||||
// @ts-ignore
|
||||
<For each={trk() ? trk().trkseg || [] : []}>
|
||||
{(trksegId: string) => {
|
||||
console.log({ caller: 'Trk / loop', trksegId });
|
||||
return <Trkseg map={map} trksegId={trksegId} />;
|
||||
}}
|
||||
</For>
|
||||
);
|
||||
};
|
||||
|
||||
export default Trk;
|
||||
Reference in new issue
Block a user