import { FeatureCollection } from '@turf/helpers/lib/geojson'; import { LngLatBounds, Layer } from 'mapbox-gl'; import { zoneLayerIds } from '../settings/layerIds'; /** * Set fill-opacity to 0 on fill layers and visibility to none on other * * @param {string} layerId * @param {mapboxgl.Map} map */ export declare const hideLayer: (layerId: string, map: mapboxgl.Map) => void; /** * Set fill-opacity to 1 on fill layers and visibility to visible on other * * @param {mapboxgl.Layer} layer * @param {mapboxgl.Map} map */ export declare const paintZonesLayer: (layer: mapboxgl.AnyLayer, map: mapboxgl.Map) => void; /** * Add layer to map * * @param {mapboxgl.Map} map * @param {mapboxgl.Layer} layer */ export declare function addLayer(map: mapboxgl.Map, layer: mapboxgl.AnyLayer): import("mapbox-gl").Map; /** * Remove layer and it source from map if map contain this layer * * @param {string} id * @param {mapboxgl.Map} map */ export declare const removeLayerIfExist: (id: string, map: mapboxgl.Map) => void; export declare const hidePositionLayers: (map: mapboxgl.Map) => void; /** * Add map marker at my current position * * @param {mapboxgl.Map} map * @param {Position} pos */ export declare const showMyPosition: (map: mapboxgl.Map, pos: GeolocationPosition) => void; /** * Focus map to bounds * * @param {mapboxgl.Map} map * @param {mapboxgl.LngLatBounds} bounds * @param {boolean} instant - if `false`, jump animated */ export declare const jumpToBounds: (map: mapboxgl.Map, bounds: LngLatBounds, instant?: boolean) => void; /** * Get zone layer style options * * @param {string} layerId */ export declare const getLayerOptById: (layerId: (typeof zoneLayerIds)[number]) => { type: string; paint: { "fill-color": string; }; } | { type: string; paint: { "fill-color": string; }; } | { type: string; paint: { "fill-color": string; }; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; layout: { 'icon-image': string; 'icon-pitch-alignment': string; 'icon-rotation-alignment': string; 'icon-size': number; }; filter: string[]; minzoom: number; } | { type: string; paint: { "fill-color": string; }; filter: string[]; minzoom: number; } | { type: string; paint: { 'line-color': string; 'line-opacity': number; 'line-width': number; 'line-dasharray': number[]; }; filter: string[]; minzoom: number; } | { type: string; layout: { 'icon-image': string; 'icon-pitch-alignment': string; 'icon-rotation-alignment': string; 'icon-size': number; }; filter: string[]; minzoom: number; } | { type: string; paint: { "fill-color": string; }; filter: string[]; minzoom: number; } | { type: string; paint: { 'line-color': string; 'line-opacity': number; 'line-width': number; 'line-dasharray': number[]; }; filter: string[]; minzoom: number; } | { type: string; paint: { "fill-color": string; }; maxzoom: number; } | { type: string; paint: { "fill-color": string; }; maxzoom: number; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; layout: { 'icon-image': string; 'icon-size': number; 'icon-pitch-alignment': string; 'icon-rotation-alignment': string; }; minzoom: number; } | { type: string; paint: { 'line-color': string; 'line-opacity': number; 'line-width': number; }; } | { type: string; paint: { "fill-color": string; }; } | { type: string; paint: { 'line-color': string; 'line-opacity': number; 'line-width': number; }; } | { paint: { 'line-color': string; 'line-width': number; 'line-dasharray': number[]; }; type: string; minzoom: number; } | { paint: { 'line-color': string; 'line-width': number; 'line-dasharray': number[]; }; type: string; minzoom: number; } | { paint: { 'line-color': string; 'line-width': number; 'line-dasharray': number[]; }; type: string; minzoom: number; } | { type: string; paint: { "fill-color": string; }; } | { type: string; paint: { "fill-color": string; }; minzoom: number; } | { type: string; layout: { 'icon-image': string[]; 'icon-pitch-alignment': string; 'icon-rotation-alignment': string; 'icon-size': number; }; } | { type: string; layout: { 'icon-image': string[]; 'icon-pitch-alignment': string; 'icon-rotation-alignment': string; 'icon-size': number; }; } | { type: string; paint: { 'line-width': number; 'line-color': string; }; minzoom: number; } | { type: string; source: { type: string; data: { type: "FeatureCollection"; features: never[]; }; }; paint: { 'fill-color': string; }; minzoom: number; }; /** * Add source as ${fc} with ${id} on ${map} * * @param {string} id * @param {FeatureCollection} fc * @param {mapboxgl.Map} map * @param {mapboxgl.GeoJSONSourceOptions} options */ export declare const addSource: (id: string, fc: FeatureCollection, map: mapboxgl.Map, options?: mapboxgl.GeoJSONSourceOptions) => void; /** * Toggle layer visibility by ${drawCondition}. Adding layer and this source unless map include this * * @param {boolean} drawCondition * @param {string} layerId * @param {FeatureCollection} fc * @param {mapboxgl.Map} map * @param {mapboxgl.Layer} layerOpt */ export declare const drawZoneLayers: (drawCondition: boolean, layerId: string, fc: FeatureCollection, map: mapboxgl.Map, layerOpt: mapboxgl.Layer) => void; /** * Get source ID by layer ID * @param {string} layerId */ export declare const getSourceIdByLayerId: (layerId: string) => string; /** * Remove all layers and sources from map * @param {mapboxgl.Map} map */ export declare const removeAllLayers: (map: mapboxgl.Map) => void; /** * Update layer zones height * * @param {mapboxgl.Map} map * @param {any} newHeight */ export declare function updateLayerHeight(map: mapboxgl.Map, newHeight: number): void; /** * Set labels lang * * @param {mapboxgl.Map} map * @param {string} lang */ export declare function applyLabelsLang(map: mapboxgl.Map, lang: string): void;