import Service from '@ember/service'; import type MapboxLoader from '../-private/mapbox-loader'; /** * This service serves as a 'cache' for the map instances and their html elements. * The Maps are used for optimizing the performance and rendering speed. */ type layerId = string; interface CachedMap { mapLoader: MapboxLoader; metadata: object; layers: Map; } export default class MapCacheService extends Service { _cache: Map; /** * Returns whether or not the cache contains the map * @param {string} key - Id of map * @return {Boolean} */ hasMap(key: string): boolean; /** * Returns the specified map object if exist on the cache * @param {string} key - Id of map * @return {CachedMap | undefined} */ getMap(key: string): CachedMap | undefined; /** * Sets or update the map instance and html element of a map * @param {string} key - Id of map * @param {MapboxLoader} mapLoader - MapboxLoader Instance of map */ setMap(key: string, mapLoader: MapboxLoader, metadata?: {}): void; /** * Deletes a map if exist by its key * @param {string} key - Id of map * @return {Boolean} */ deleteMap(key: string): boolean; } export {}; //# sourceMappingURL=map-cache.d.ts.map