Check spelling
This commit is contained in:
parent
a6edcca740
commit
0b7de58a4e
|
@ -32,13 +32,13 @@ SVG is very generic and is used to draw 2D figures in HTML applications and does
|
|||
|
||||
KML, GeoJSON and OSM elements have been designed to represent generic geographical points and shapes.
|
||||
|
||||
GPX is more specific, having been designed to represent routes and tracks and its semantices are directly useable in our application.
|
||||
GPX is more specific, having been designed to represent routes and tracks and its semantics are directly useable in our application.
|
||||
|
||||
The strucure of our components and indexes can therefore follow the GPX format.
|
||||
The structure of our components and indexes can therefore follow the GPX format.
|
||||
|
||||
OSM elements is interesting to extract information from the OSM DB, either by querying their API or by downloading portions of the database.
|
||||
|
||||
GeoJSON might be of interest as an intermediate format since a number of JS libraries have been developped to perform queries or draw GeoJSON data as SVG.
|
||||
GeoJSON might be of interest as an intermediate format since a number of JS libraries have been developed to perform queries or draw GeoJSON data as SVG.
|
||||
|
||||
KML might be considered as an import format.
|
||||
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
import react from 'react';
|
||||
|
||||
import { TileKey } from './types';
|
||||
import { Rectangle, TileKeyObject } from './types';
|
||||
|
||||
export interface TiledLayerProperties {
|
||||
/** The key of the first (ie top/left) tile */
|
||||
key: TileKey;
|
||||
keyObject: TileKeyObject;
|
||||
/** Number of tiles (in each direction since TiledLayers are square)*/
|
||||
nbTiles: number;
|
||||
/** The current viewport expressed in tiles coordinates */
|
||||
viewPort: Rectangle;
|
||||
}
|
||||
|
||||
/**
|
||||
* A lazyly loaded square layer of tiles.
|
||||
* A lazily loaded square layer of tiles.
|
||||
*
|
||||
* This component is rather dumb and is mainly a sparse array of tiles.
|
||||
* New tiles are added to the array when the viewport is updated and they stay in the array until
|
||||
* the component is destroyed or its number of tiles is updated.
|
||||
*
|
||||
*/
|
||||
export const TiledLayer: react.FC<TiledLayerProperties> = (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* An identifier for tiles (can also be used for tile layers)
|
||||
*/
|
||||
export interface TileKey {
|
||||
export interface TileKeyObject {
|
||||
/**A tile provider id ('osm', 'otm', ...) */
|
||||
provider: string;
|
||||
/**The zoom level (integer) */
|
||||
|
@ -11,3 +11,21 @@ export interface TileKey {
|
|||
/**The Y coordinate (integer) */
|
||||
y: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A point
|
||||
*/
|
||||
export interface Point {
|
||||
/**The X coordinate (integer)*/
|
||||
x: number;
|
||||
/**The Y coordinate (integer) */
|
||||
y: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A rectangle
|
||||
*/
|
||||
export interface Rectangle {
|
||||
topLeft: Point;
|
||||
bottomRight: Point;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue