diff --git a/src/components/map/Handlers.tsx b/src/components/map/Handlers.tsx index 419ddf5..4fb4c7a 100644 --- a/src/components/map/Handlers.tsx +++ b/src/components/map/Handlers.tsx @@ -7,10 +7,11 @@ import { Transformation } from './LiveMap'; /** * - * See also {@link components/map/Map!relativeCoordinateSystemAtom}. + * * */ export interface HandlersProperties { + /** The transformation to apply on the `` parent */ transformMap: (t: Transformation) => void; } /** @@ -24,7 +25,7 @@ export interface HandlersProperties { * * touchStart, touchEnd and touchCancel to track touch state * * touchMove to shift the map (single finger) or shift and zoom (two fingers). * - * Communication with the parent `` is done through {@link components/map/Map!relativeCoordinateSystemAtom}. + * Communication with the parent `` is done through the transformMap {@link components/map/LiveMap!Transformation} property. */ export const Handlers: react.FC = ( props: HandlersProperties diff --git a/src/components/map/LayerStack.tsx b/src/components/map/LayerStack.tsx index a963f26..25d07bd 100644 --- a/src/components/map/LayerStack.tsx +++ b/src/components/map/LayerStack.tsx @@ -17,7 +17,7 @@ export interface LayerStackProperties { */ numberOfTiledLayers?: number; /** - * The current coordinates system + * The coordinates system */ coordinateSystem: CoordinateSystem; } @@ -27,10 +27,13 @@ export interface LayerStackProperties { * @param props * @returns A stack of layers embedded in an SVG element * - * This component does the conversion between the {@link components/map/Map!CoordinateSystem} stored - * in the {@link components/map/Map!coordinateSystemAtom} atom and the {@link components/map/TiledLayer!TiledLayer} + * This component does the conversion between the {@link components/map/LiveMap!CoordinateSystem} and + * the `<`{@link components/map/TiledLayer!TiledLayer}`>` * components which units are in tiles. * + * When more then one {@link components/map/TiledLayer!TiledLayer} is required, the tiled layer identified by the keyObject is considered active and new tiles are added + * as needed and the other layers are used as backups while the tiles are loading. + * */ export const LayerStack: react.FC = ( props: LayerStackProperties diff --git a/src/components/map/TileSet.tsx b/src/components/map/TileSet.tsx index 2001e45..37eface 100644 --- a/src/components/map/TileSet.tsx +++ b/src/components/map/TileSet.tsx @@ -102,6 +102,9 @@ export const TileSet: react.FC = memo( tiles.delete(tileKey); }); } + if (globalThis.cacheForTileSet.has(key)) { + globalThis.cacheForTileSet.delete(key); + } globalThis.cacheForTileSet.set(key, tiles); if (globalThis.cacheForTileSet > tileSetConfig.numberOfCachedLayers) { const oldestCachedLayerKeys = [...globalThis.cacheForTileSet.keys()];