From e1583846ede179b0a307fd3a8d4c6e154c9ddc92 Mon Sep 17 00:00:00 2001 From: evlist Date: Tue, 1 Nov 2022 14:37:08 +0100 Subject: [PATCH] Cleanup and doc. --- src/components/map/LiveMap.tsx | 11 +++++++++++ src/components/map/Map.tsx | 4 ++++ src/components/map/types.ts | 6 ------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/map/LiveMap.tsx b/src/components/map/LiveMap.tsx index 398ae4e..79551b2 100644 --- a/src/components/map/LiveMap.tsx +++ b/src/components/map/LiveMap.tsx @@ -35,6 +35,17 @@ export interface LiveMapProperties { numberOfTiledLayers?: number; } +/** + * + * @param props + * @returns A `` component. + * + * A `` is a wrapper around a {@link components/map/Map!Map} component which updates the ``'s scope according to user's mouse, wheel and touch events. + * + * To do so, `` embeds a `` component together with a {@link components/map/Handlers!Handlers} component which listens to user's event. + * + * The main task of `` components is thus to translate {@link Transformation}s delivered by `` in pixels into geographical coordinates. + */ export const LiveMap: react.FC = ( props: LiveMapProperties ) => { diff --git a/src/components/map/Map.tsx b/src/components/map/Map.tsx index 7a608ac..f39d2b8 100644 --- a/src/components/map/Map.tsx +++ b/src/components/map/Map.tsx @@ -13,6 +13,10 @@ export interface MapProperties { /** * * @returns A `` component + * + * `` components display the map specified by their {@link MapProperties}'s scope. + * + * They can be driven by {@link components/map/LiveMap!LiveMap} component to react to user's event. * */ export const Map: react.FC = (props: MapProperties) => { diff --git a/src/components/map/types.ts b/src/components/map/types.ts index 12e8fa8..5bf0539 100644 --- a/src/components/map/types.ts +++ b/src/components/map/types.ts @@ -51,9 +51,3 @@ export interface Rectangle { topLeft: Point; bottomRight: Point; } - -/** - * A function which creates tiles - * @param keyObject - the {@link TileKeyObject} identifying the tile. - */ -export type TileFactory = (keyObject: TileKeyObject) => any;