Update of latlon2country and use its async interface; small refactoring of simplemetagging, improvements to cacheBuilder which respects isShown and calculated tags now

This commit is contained in:
Pieter Vander Vennet 2021-12-07 02:22:56 +01:00
parent e053e9f279
commit 9cfb7fbe68
14 changed files with 417 additions and 4320 deletions

View file

@ -86,6 +86,10 @@ export default class TiledFeatureSource implements Tiled, IndexedFeatureSource,
}
public static createHierarchy(features: FeatureSource, options?: TiledFeatureSourceOptions): TiledFeatureSource {
options = {
...options,
layer: features["layer"] ?? options.layer
}
const root = new TiledFeatureSource(0, 0, 0, null, options)
features.features?.addCallbackAndRunD(feats => root.addFeatures(feats))
return root;
@ -200,6 +204,6 @@ export interface TiledFeatureSourceOptions {
* Setting 'dontEnforceMinZoomLevel' will still allow bigger zoom levels for those features
*/
readonly dontEnforceMinZoom?: boolean,
readonly registerTile?: (tile: TiledFeatureSource & Tiled) => void,
readonly registerTile?: (tile: TiledFeatureSource & FeatureSourceForLayer & Tiled) => void,
readonly layer?: FilteredLayer
}