Cleanup and doc.
This commit is contained in:
parent
de69aff4c9
commit
e1583846ed
|
@ -35,6 +35,17 @@ export interface LiveMapProperties {
|
||||||
numberOfTiledLayers?: number;
|
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> = (
|
export const LiveMap: react.FC<LiveMapProperties> = (
|
||||||
props: LiveMapProperties
|
props: LiveMapProperties
|
||||||
) => {
|
) => {
|
||||||
|
|
|
@ -14,6 +14,10 @@ export interface MapProperties {
|
||||||
*
|
*
|
||||||
* @returns A `<Map>` component
|
* @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) => {
|
export const Map: react.FC<MapProperties> = (props: MapProperties) => {
|
||||||
const tileProvider = tileProviders[props.scope.tileProvider];
|
const tileProvider = tileProviders[props.scope.tileProvider];
|
||||||
|
|
|
@ -51,9 +51,3 @@ export interface Rectangle {
|
||||||
topLeft: Point;
|
topLeft: Point;
|
||||||
bottomRight: Point;
|
bottomRight: Point;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A function which creates tiles
|
|
||||||
* @param keyObject - the {@link TileKeyObject} identifying the tile.
|
|
||||||
*/
|
|
||||||
export type TileFactory = (keyObject: TileKeyObject) => any;
|
|
||||||
|
|
Loading…
Reference in New Issue