import type { Customization } from "../../common/types"; import { MMapLayerProps } from "../MMapLayer"; import { MMapComplexEntity } from "../MMapEnities"; /** * Types of underlay layers available in the default scheme. * Each layer is displayed on the map according to its zIndex. * By default, layers are displayed in the following order: * 1. ground * 2. buildings * 3. icons * 4. labels * @see https://mappable.world/docs/js-api/dg/concepts/general.html#source-prepared */ type MMapDefaultSchemeLayerType = "ground" | "buildings" | "icons" | "labels"; /** * MMapDefaultSchemeLayer props */ type MMapDefaultSchemeLayerProps = { /** * Should show layers * @deprecated use {@link MMapDefaultSchemeLayerProps}.layers instead */ visible?: boolean; /** Tiles customization. */ customization?: Customization; /** * Theme applied to the scheme * @deprecated use {@link MMapProps}.theme prop in {@link MMap} instead * */ theme?: "dark" | "light"; /** Name for source */ source?: string; /** Layers parameters */ layers?: Partial>>; /** * Allow to clamp map zoom. If you want the layer to not lock zoom when it reaches * its maximum value, you can set this field to false. * This may be necessary, for example, when your own layers are working at scales greater than 21. * ```js * const defaultSchemeLayer = new MMapDefaultSchemeLayer({clampMapZoom: false}); * map.addChild(defaultSchemeLayer); * ``` * See example https://mappable.world/docs/js-api/examples/cases/over-zoom.html * @default true */ clampMapZoom?: boolean; }; declare const defaultProps: { visible: boolean; source: string; layers: { ground: { zIndex: number; }; buildings: { zIndex: number; }; icons: { zIndex: number; }; labels: { zIndex: number; }; }; /** @deprecated use {@link DefaultProps}.layers instead */ readonly layersInfo: Record; clampMapZoom: boolean; }; type DefaultProps = typeof defaultProps; declare const MAP_TYPES: { map: string; admin: string; driving: string; transit: string; "future-map": string; }; /** * Map default layer to show mappable-world scheme on map. * * @example * ```javascript * const defaultSchemeLayer = new MMapDefaultSchemeLayer({theme: 'dark'}); * // add to map * map.addChild(defaultSchemeLayer); * // update * defaultSchemeLayer.update({theme: 'light'}); * ``` */ declare class MMapDefaultSchemeLayer extends MMapComplexEntity { static defaultProps: { visible: boolean; source: string; layers: { ground: { zIndex: number; }; buildings: { zIndex: number; }; icons: { zIndex: number; }; labels: { zIndex: number; }; }; /** @deprecated use {@link DefaultProps}.layers instead */ readonly layersInfo: Record; clampMapZoom: boolean; }; private _dataSource?; private _layers; private _unwatchMapContext?; private _unwatchThemeContext?; private _coverageSubscription?; protected _onAttach(): void; protected _onDetach(): void; protected _onUpdate(propsDiff: Partial): void; private _getTileDataSourceProps; private _updateTheme; } export { MMapDefaultSchemeLayer, MMapDefaultSchemeLayerProps, MAP_TYPES };