UNPKG

1.47 kBTypeScriptView Raw
1import Feature, { FeatureLike } from './Feature';
2import { FeatureLoader } from './featureloader';
3import FeatureFormat from './format/Feature';
4import Geometry from './geom/Geometry';
5import Projection from './proj/Projection';
6import Tile, { LoadFunction, Options } from './Tile';
7import { TileCoord } from './tilecoord';
8import TileState from './TileState';
9
10export default class VectorTile extends Tile {
11 constructor(
12 tileCoord: TileCoord,
13 state: TileState,
14 src: string,
15 format: FeatureFormat,
16 tileLoadFunction: LoadFunction,
17 opt_options?: Options,
18 );
19 /**
20 * Get the features for this tile. Geometries will be in the view projection.
21 */
22 getFeatures(): FeatureLike[];
23 /**
24 * Get the feature format assigned for reading this tile's features.
25 */
26 getFormat(): FeatureFormat;
27 /**
28 * Load not yet loaded URI.
29 */
30 load(): void;
31 /**
32 * Handler for tile load errors.
33 */
34 onError(): void;
35 /**
36 * Handler for successful tile load.
37 */
38 onLoad(features: Feature<Geometry>[], dataProjection: Projection): void;
39 /**
40 * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s tileLoadFunction.
41 * Sets the features for the tile.
42 */
43 setFeatures(features: Feature<Geometry>[]): void;
44 /**
45 * Set the feature loader for reading this tile's features.
46 */
47 setLoader(loader: FeatureLoader): void;
48}