carte-facile
Version:
Une librairie de styles de cartes et surcouches prêtes à l'emploi, pour ajouter des cartes rapidement à votre application avec MapLibre ou d'autres librairies cartographiques.
735 lines • 25.8 kB
TypeScript
import { OverlayType, LayerGroupType } from './types';
import type { StyleSpecification } from 'maplibre-gl';
/**
* Map styles configuration
* Each style is a complete MapLibre style configuration
*/
export declare const mapStyles: {
simple: StyleSpecification;
simpleOsm: StyleSpecification;
aerial: StyleSpecification;
desaturated: StyleSpecification;
};
/**
* @deprecated Use mapStyles instead. This will be removed in the next major version.
*/
export declare const mapStyle: {
simple: StyleSpecification;
simpleOsm: StyleSpecification;
aerial: StyleSpecification;
desaturated: StyleSpecification;
};
/**
* Map thumbnails configuration
* Used for style selection UI
*/
export declare const mapThumbnails: {
readonly simple: string;
readonly simpleOsm: string;
readonly aerial: string;
readonly desaturated: string;
readonly cadastre: string;
readonly administrativeBoundaries: string;
readonly levelCurves: string;
};
/**
* Map overlays configuration
* Each overlay has two variants:
* - neutral: for standard map styles (simple, desaturated)
* - color: for aerial map style
*/
export declare const mapOverlays: {
readonly cadastre: {
readonly neutral: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
visibility: string;
"text-field"?: undefined;
"text-font"?: undefined;
"text-size"?: undefined;
};
paint: {
"line-color": string;
"line-opacity": number;
"line-width": {
stops: number[][];
};
"text-color"?: undefined;
"text-halo-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-blur"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
visibility: string;
"text-field"?: undefined;
"text-font"?: undefined;
"text-size"?: undefined;
};
paint: {
"line-color": string;
"line-width": {
stops: number[][];
};
"line-opacity"?: undefined;
"text-color"?: undefined;
"text-halo-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-blur"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"text-field": string;
"text-font": string[];
"text-size": {
stops: number[][];
};
visibility: string;
};
paint: {
"text-color": string;
"text-halo-color": string;
"text-halo-width": number;
"text-halo-blur": number;
"line-color"?: undefined;
"line-opacity"?: undefined;
"line-width"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"text-field": string;
"text-font": string[];
visibility: string;
"text-size"?: undefined;
};
paint: {
"text-color": string;
"text-halo-color": string;
"text-halo-width": number;
"text-halo-blur": number;
"line-color"?: undefined;
"line-opacity"?: undefined;
"line-width"?: undefined;
};
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
cadastre: {
type: string;
url: string;
};
};
};
readonly color: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
visibility: string;
"text-field"?: undefined;
"text-font"?: undefined;
"text-size"?: undefined;
};
paint: {
"line-color": string;
"line-opacity": number;
"line-width": {
stops: number[][];
};
"text-color"?: undefined;
"text-halo-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-blur"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
visibility: string;
"text-field"?: undefined;
"text-font"?: undefined;
"text-size"?: undefined;
};
paint: {
"line-color": string;
"line-width": {
stops: number[][];
};
"line-opacity"?: undefined;
"text-color"?: undefined;
"text-halo-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-blur"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"text-field": string;
"text-font": string[];
"text-size": {
stops: number[][];
};
visibility: string;
};
paint: {
"text-color": string;
"text-halo-color": string;
"text-halo-width": number;
"text-halo-blur": number;
"line-color"?: undefined;
"line-opacity"?: undefined;
"line-width"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"text-field": string;
"text-font": string[];
visibility: string;
"text-size"?: undefined;
};
paint: {
"text-color": string;
"text-halo-color": string;
"text-halo-width": number;
"text-halo-blur": number;
"line-color"?: undefined;
"line-opacity"?: undefined;
"line-width"?: undefined;
};
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
cadastre: {
type: string;
url: string;
};
};
};
};
readonly administrativeBoundaries: {
readonly neutral: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": {
stops: number[][];
};
};
maxzoom?: undefined;
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility: string;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": number;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": {
stops: number[][];
};
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": (string | number | string[])[];
};
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
"decoupage-administratif": {
type: string;
url: string;
};
};
};
readonly color: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": {
stops: number[][];
};
};
maxzoom?: undefined;
} | {
id: string;
type: string;
source: string;
metadata: {
"cartefacile:group": string;
};
"source-layer": string;
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility: string;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": number;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": {
stops: number[][];
};
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
metadata: {
"cartefacile:group": string;
};
minzoom: number;
maxzoom: number;
layout: {
"line-cap": string;
visibility?: undefined;
};
paint: {
"line-color": string;
"line-opacity": (string | number | string[])[];
"line-width": (string | number | string[])[];
};
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
"decoupage-administratif": {
type: string;
url: string;
};
};
};
};
readonly levelCurves: {
readonly neutral: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
maxzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
"line-cap": string;
"line-join": string;
visibility: string;
"text-field"?: undefined;
"symbol-placement"?: undefined;
"text-size"?: undefined;
"text-font"?: undefined;
"text-pitch-alignment"?: undefined;
"text-rotation-alignment"?: undefined;
"text-keep-upright"?: undefined;
};
paint: {
"line-color": string;
"line-width": (string | number | string[])[];
"line-opacity": (string | number | string[])[];
"text-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-color"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
maxzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
visibility: string;
"line-cap"?: undefined;
"line-join"?: undefined;
"text-field"?: undefined;
"symbol-placement"?: undefined;
"text-size"?: undefined;
"text-font"?: undefined;
"text-pitch-alignment"?: undefined;
"text-rotation-alignment"?: undefined;
"text-keep-upright"?: undefined;
};
paint: {
"line-color": string;
"line-width": (string | number | string[])[];
"line-opacity": (string | number | string[])[];
"text-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-color"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
"text-field": string;
visibility: string;
"symbol-placement": string;
"text-size": {
stops: number[][];
};
"text-font": string[];
"text-pitch-alignment": string;
"text-rotation-alignment": string;
"text-keep-upright": boolean;
"line-cap"?: undefined;
"line-join"?: undefined;
};
paint: {
"text-color": string;
"text-halo-width": number;
"text-halo-color": string;
"line-color"?: undefined;
"line-width"?: undefined;
"line-opacity"?: undefined;
};
maxzoom?: undefined;
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
isohypse: {
type: string;
url: string;
};
};
};
readonly color: {
readonly layers: ({
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
maxzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
"line-cap": string;
"line-join": string;
visibility: string;
"text-field"?: undefined;
"symbol-placement"?: undefined;
"text-size"?: undefined;
"text-font"?: undefined;
"text-pitch-alignment"?: undefined;
"text-rotation-alignment"?: undefined;
"text-keep-upright"?: undefined;
};
paint: {
"line-color": string;
"line-width": (string | number | string[])[];
"line-opacity": (string | number | string[])[];
"text-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-color"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
maxzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
visibility: string;
"line-cap"?: undefined;
"line-join"?: undefined;
"text-field"?: undefined;
"symbol-placement"?: undefined;
"text-size"?: undefined;
"text-font"?: undefined;
"text-pitch-alignment"?: undefined;
"text-rotation-alignment"?: undefined;
"text-keep-upright"?: undefined;
};
paint: {
"line-color": string;
"line-width": (string | number | string[])[];
"line-opacity": (string | number | string[])[];
"text-color"?: undefined;
"text-halo-width"?: undefined;
"text-halo-color"?: undefined;
};
} | {
id: string;
type: string;
source: string;
"source-layer": string;
minzoom: number;
filter: (string | (string | number | (string | number | string[])[])[])[];
layout: {
"text-field": string;
visibility: string;
"symbol-placement": string;
"text-size": {
stops: number[][];
};
"text-font": string[];
"text-pitch-alignment": string;
"text-rotation-alignment": string;
"text-keep-upright": boolean;
"line-cap"?: undefined;
"line-join"?: undefined;
};
paint: {
"text-color": string;
"text-halo-width": number;
"text-halo-color": string;
"line-color"?: undefined;
"line-width"?: undefined;
"line-opacity"?: undefined;
};
maxzoom?: undefined;
})[];
readonly name: string;
readonly metadata: {
fr: {
name: string;
description: string;
};
en: {
name: string;
description: string;
};
"maputnik:renderer": string;
};
readonly sources: {
isohypse: {
type: string;
url: string;
};
};
};
};
};
/**
* Adds one or more overlays to the map
* @param map - The MapLibre map instance
* @param type - The type of overlay(s) to add (cadastre, administrative-boundaries, or level-curves)
*/
export declare function addOverlay(map: maplibregl.Map, type: OverlayType | OverlayType[]): void;
/**
* Removes one or more overlays from the map
* @param map - The MapLibre map instance
* @param type - The type of overlay(s) to remove (cadastre, administrative-boundaries, or level-curves)
*/
export declare function removeOverlay(map: maplibregl.Map, type: OverlayType | OverlayType[]): void;
/**
* Show the specified layer groups
* @param map - The MapLibre map instance
* @param groups - List of layer groups to show
*/
export declare function showLayer(map: maplibregl.Map, groups: LayerGroupType | LayerGroupType[]): void;
/**
* Hide the specified layer groups
* @param map - The MapLibre map instance
* @param groups - List of layer groups to hide
*/
export declare function hideLayer(map: maplibregl.Map, groups: LayerGroupType | LayerGroupType[]): void;
//# sourceMappingURL=maps.d.ts.map