/** * Maplibre export first, then extensions can overload the exports. */ export * from "maplibre-gl"; /** * To perform explicit named export so that they are included in the UMD bundle */ // import * as ML from "maplibre-gl"; import maplibregl from "maplibre-gl"; const { supported, setRTLTextPlugin, getRTLTextPluginStatus, LngLat, LngLatBounds, MercatorCoordinate, Evented, AJAXError, prewarm, clearPrewarmedResources, version, workerCount, maxParallelImageRequests, workerUrl, addProtocol, removeProtocol, } = maplibregl; // We still want to export maplibregl.Map, but as a different name const MapMLGL = maplibregl.Map; const MarkerMLGL = maplibregl.Marker; const PopupMLGL = maplibregl.Popup; const StyleMLGL = maplibregl.Style; const CanvasSourceMLGL = maplibregl.CanvasSource; const GeoJSONSourceMLGL = maplibregl.GeoJSONSource; const ImageSourceMLGL = maplibregl.ImageSource; const RasterTileSourceMLGL = maplibregl.RasterTileSource; const RasterDEMTileSourceMLGL = maplibregl.RasterDEMTileSource; const VectorTileSourceMLGL = maplibregl.VectorTileSource; const VideoSourceMLGL = maplibregl.VideoSource; const NavigationControlMLGL = maplibregl.NavigationControl; const GeolocateControlMLGL = maplibregl.GeolocateControl; const AttributionControlMLGL = maplibregl.AttributionControl; const LogoControlMLGL = maplibregl.LogoControl; const ScaleControlMLGL = maplibregl.ScaleControl; const FullscreenControlMLGL = maplibregl.FullscreenControl; const TerrainControlMLGL = maplibregl.TerrainControl; export { supported, setRTLTextPlugin, getRTLTextPluginStatus, PopupMLGL, MarkerMLGL, StyleMLGL, LngLat, LngLatBounds, MercatorCoordinate, Evented, AJAXError, CanvasSourceMLGL, GeoJSONSourceMLGL, ImageSourceMLGL, RasterDEMTileSourceMLGL, RasterTileSourceMLGL, VectorTileSourceMLGL, VideoSourceMLGL, prewarm, clearPrewarmedResources, version, workerCount, maxParallelImageRequests, workerUrl, addProtocol, removeProtocol, MapMLGL, }; // Exporting types of class instances from MapLibre: export type NavigationControlMLGL = InstanceType; export type GeolocateControlMLGL = InstanceType; export type AttributionControlMLGL = InstanceType< typeof AttributionControlMLGL >; export type LogoControlMLGL = InstanceType; export type ScaleControlMLGL = InstanceType; export type FullscreenControlMLGL = InstanceType; export type TerrainControlMLGL = InstanceType; export type MarkerMLGL = InstanceType; export type PopupMLGL = InstanceType; export type StyleMLGL = InstanceType; export type LngLat = InstanceType; export type LngLatBounds = InstanceType; export type MercatorCoordinate = InstanceType; export type Evented = InstanceType; export type AJAXError = InstanceType; export type CanvasSourceMLGL = InstanceType; export type GeoJSONSourceMLGL = InstanceType; export type ImageSourceMLGL = InstanceType; export type RasterDEMTileSourceMLGL = InstanceType< typeof RasterDEMTileSourceMLGL >; export type RasterTileSourceMLGL = InstanceType; export type VectorTileSourceMLGL = InstanceType; export type VideoSourceMLGL = InstanceType; export type MapMLGL = InstanceType; // SDK specific import { Map, GeolocationType } from "./Map"; import type { MapOptions, LoadWithTerrainEvent } from "./Map"; import { Marker } from "./Marker"; import { Popup } from "./Popup"; import { Style } from "./Style"; import { CanvasSource } from "./CanvasSource"; import { GeoJSONSource } from "./GeoJSONSource"; import { ImageSource } from "./ImageSource"; import { RasterTileSource } from "./RasterTileSource"; import { RasterDEMTileSource } from "./RasterDEMTileSource"; import { VectorTileSource } from "./VectorTileSource"; import { VideoSource } from "./VideoSource"; import { NavigationControl } from "./NavigationControl"; import { GeolocateControl } from "./GeolocateControl"; import { AttributionControl } from "./AttributionControl"; import { LogoControl } from "./LogoControl"; import { ScaleControl } from "./ScaleControl"; import { FullscreenControl } from "./FullscreenControl"; import { TerrainControl } from "./TerrainControl"; // Import of modified versions of the controls import { MaptilerGeolocateControl } from "./MaptilerGeolocateControl"; import { MaptilerLogoControl } from "./MaptilerLogoControl"; import { MaptilerTerrainControl } from "./MaptilerTerrainControl"; import { MaptilerNavigationControl } from "./MaptilerNavigationControl"; // importing client functions to expose them as part of the SDK import type { BBox, Position, GeocodingOptions, CoordinatesSearchOptions, CenteredStaticMapOptions, AutomaticStaticMapOptions, BoundedStaticMapOptions, } from "@maptiler/client"; import { geocoding, geolocation, coordinates, data, staticMaps, ServiceError, LanguageGeocoding, LanguageGeocodingString, ReferenceMapStyle, MapStyle, MapStyleVariant, } from "@maptiler/client"; import type { MapStyleType } from "@maptiler/client"; import { Point } from "./Point"; import type { Matrix2 } from "./Point"; // Importing enums and configs import { config, SdkConfig } from "./config"; import { Language, LanguageString, LanguageKey, setPrimaryLanguage, setSecondaryLanguage, } from "./language"; import type { Unit } from "./unit"; // Exporting types export type { MapOptions, LoadWithTerrainEvent, GeocodingOptions, BBox, Position, CoordinatesSearchOptions, CenteredStaticMapOptions, BoundedStaticMapOptions, AutomaticStaticMapOptions, LanguageString, LanguageKey, LanguageGeocodingString, Unit, MapStyleType, Matrix2, }; // Exporting classes, objects, functions, etc. export { Map, Marker, Popup, Style, CanvasSource, GeoJSONSource, ImageSource, RasterTileSource, RasterDEMTileSource, VideoSource, NavigationControl, GeolocateControl, AttributionControl, LogoControl, ScaleControl, FullscreenControl, TerrainControl, VectorTileSource, GeolocationType, SdkConfig, config, ServiceError, geocoding, geolocation, coordinates, data, staticMaps, MapStyle, Language, LanguageGeocoding, setPrimaryLanguage, setSecondaryLanguage, Point, ReferenceMapStyle, MapStyleVariant, MaptilerGeolocateControl, MaptilerLogoControl, MaptilerTerrainControl, MaptilerNavigationControl, };