Cleanup and doc.

This commit is contained in:
Eric van der Vlist 2022-11-01 14:37:08 +01:00
parent de69aff4c9
commit e1583846ed
3 changed files with 15 additions and 6 deletions

View File

@ -35,6 +35,17 @@ export interface LiveMapProperties {
numberOfTiledLayers?: number;
}
/**
*
* @param props
* @returns A `<LiveMap>` component.
*
* A `<LiveMap>` is a wrapper around a {@link components/map/Map!Map} component which updates the `<Map>`'s scope according to user's mouse, wheel and touch events.
*
* To do so, `<LiveMap>` embeds a `<Map>` component together with a {@link components/map/Handlers!Handlers} component which listens to user's event.
*
* The main task of `<LiveMap>` components is thus to translate {@link Transformation}s delivered by `<Handler>` in pixels into geographical coordinates.
*/
export const LiveMap: react.FC<LiveMapProperties> = (
props: LiveMapProperties
) => {

View File

@ -14,6 +14,10 @@ export interface MapProperties {
*
* @returns A `<Map>` component
*
* `<Map>` 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<MapProperties> = (props: MapProperties) => {
const tileProvider = tileProviders[props.scope.tileProvider];

View File

@ -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;