@maptiler/sdk 4.2.0-rc.1 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ declare const CAMERA_EVENTS: readonly ["moveend", "movestart", "move", "zoomend"
19
19
  declare const UI_EVENTS: readonly ["click", "dblclick", "mousedown", "mouseup", "mousemove", "mouseout", "mouseover", "contextmenu", "touchstart", "touchend", "touchmove", "touchcancel"];
20
20
  declare const COOPERATIVE_GESTURE_EVENTS: readonly ["cooperativegestureprevented"];
21
21
  declare const DATA_EVENTS: readonly ["data", "dataloading", "sourcedata", "sourcedataloading", "dataabort", "sourcedataabort"];
22
- export declare const IMAGE_VIEWER_EVENT_TYPES: ("error" | "load" | "idle" | "remove" | "render" | "resize" | "webglcontextlost" | "webglcontextrestored" | "dataloading" | "data" | "sourcedataloading" | "sourcedata" | "dataabort" | "sourcedataabort" | "boxzoomcancel" | "boxzoomstart" | "boxzoomend" | "touchcancel" | "touchmove" | "touchend" | "touchstart" | "click" | "contextmenu" | "dblclick" | "mousemove" | "mouseup" | "mousedown" | "mouseout" | "mouseover" | "movestart" | "move" | "moveend" | "zoomstart" | "zoom" | "zoomend" | "rotatestart" | "rotate" | "rotateend" | "dragstart" | "drag" | "dragend" | "cooperativegestureprevented")[];
22
+ export declare const IMAGE_VIEWER_EVENT_TYPES: ("remove" | "error" | "load" | "idle" | "render" | "resize" | "webglcontextlost" | "webglcontextrestored" | "dataloading" | "data" | "sourcedataloading" | "sourcedata" | "dataabort" | "sourcedataabort" | "boxzoomcancel" | "boxzoomstart" | "boxzoomend" | "touchcancel" | "touchmove" | "touchend" | "touchstart" | "click" | "contextmenu" | "dblclick" | "mousemove" | "mouseup" | "mousedown" | "mouseout" | "mouseover" | "movestart" | "move" | "moveend" | "zoomstart" | "zoom" | "zoomend" | "rotatestart" | "rotate" | "rotateend" | "dragstart" | "drag" | "dragend" | "cooperativegestureprevented")[];
23
23
  type BaseMapEventKeys = (typeof BASE_MAP_EVENT_TYPES)[number];
24
24
  type UiEventKeys = (typeof UI_EVENTS)[number];
25
25
  type CameraEventKeys = (typeof CAMERA_EVENTS)[number];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Makes MapLibre AttributionControl sanitize attributions properly
3
+ *
4
+ * Attributions come from styles and TileJSONs, which may not be trusted, but MapLibre only removes some of the
5
+ * dangerous markup from them (it even skips the attribute after each one it removes). MapLibre AttributionControl
6
+ * itself is patched, rather than only the SDK AttributionControl extending it, because that is the one the map
7
+ * adds by default.
8
+ */
9
+ export {};
package/dist/config.d.ts CHANGED
@@ -80,6 +80,24 @@ declare class SdkConfig extends EventEmitter {
80
80
  * Get the fetch fucntion
81
81
  */
82
82
  get fetch(): FetchFunction | null;
83
+ /**
84
+ * Switch between the default `api.maptiler.com` host and the EU-based `api.maptiler.eu` host.
85
+ * Set to `false` to switch back to the default.
86
+ */
87
+ set useEuEndpoints(value: boolean);
88
+ /**
89
+ * Whether the EU-based `api.maptiler.eu` host is currently in use instead of the default `api.maptiler.com`
90
+ */
91
+ get useEuEndpoints(): boolean;
92
+ /**
93
+ * The host currently used for the MapTiler API requests (`api.maptiler.com` or `api.maptiler.eu`)
94
+ */
95
+ get apiHost(): string;
96
+ /**
97
+ * The base URL currently used for the MapTiler API requests
98
+ * (`https://api.maptiler.com/` or `https://api.maptiler.eu/`)
99
+ */
100
+ get apiURL(): string;
83
101
  /**
84
102
  * The default number of steps to sample for the experimental flyTo path preloading.
85
103
  */
@@ -2,14 +2,10 @@
2
2
  * Some default settings for the SDK
3
3
  */
4
4
  declare const defaults: {
5
- maptilerLogoURL: string;
6
5
  maptilerURL: string;
7
- maptilerApiHost: string;
8
- telemetryURL: string;
9
6
  rtlPluginURL: string;
10
7
  primaryLanguage: import('@maptiler/client').LanguageInfo;
11
8
  secondaryLanguage: import('@maptiler/client').LanguageInfo;
12
- terrainSourceURL: string;
13
9
  terrainSourceId: string;
14
10
  };
15
11
  export { defaults };
package/dist/index.d.ts CHANGED
@@ -86,9 +86,8 @@ export * from './ml-types';
86
86
  export { Map, GeolocationType, type AttributionControlOptions, type MapOptions, type LoadWithTerrainEvent } from './Map';
87
87
  export type { CameraPosition, TilePreloadOptions, WithTilePreload, PreloadTilesForBoundsOptions, PreloadTilesForCameraPositionsOptions, PreloadTilesOptions, TilePreloadErrorCallback, TilePreloadProgressCallback, } from './tile-preloading';
88
88
  export { type BaseGeocodingOptions, type ByIdGeocodingOptions, type CommonForwardAndReverseGeocodingOptions, type GeocodingOptions, type LanguageGeocodingOptions, type ReverseGeocodingOptions, geocoding, } from './geocoding';
89
- export { type ExtraRoutingOptions, type RoutingOptions, routing } from './routing';
90
89
  export * from './controls';
91
- export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type CenteredStaticMapOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, type RoutingAvoidances, type RoutingBicycleOptions, type RoutingCarOptions, type RoutingDistanceUnit, type RoutingInstructionsLanguage, type RoutingLocation, type RoutingPedestrianOptions, type RoutingProfile, type RoutingProfileOptions, type RoutingRequest, type RoutingResponse, type RoutingRoute, type RoutingRouteLeg, type RoutingRouteManeuver, type RoutingRouteStep, type RoutingSummary, type RoutingTruckOptions, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, canParsePixelData, } from '@maptiler/client';
90
+ export { type AutomaticStaticMapOptions, type BoundedStaticMapOptions, type BufferToPixelDataFunction, type CenteredStaticMapOptions, type CoordinateExport, type CoordinateGrid, type CoordinateId, type CoordinateSearch, type CoordinateSearchResult, type CoordinateTransformResult, type CoordinateTransformation, type Coordinates, type CoordinatesSearchOptions, type CoordinatesTransformOptions, type DefaultTransformation, type ElevationAtOptions, type ElevationBatchOptions, type FeatureHierarchy, type FetchFunction, type GeocodingFeature, type GeocodingSearchResult, type GeolocationInfoOptions, type GeolocationResult, type GetDataOptions, MapStyle, type MapStylePreset, type MapStyleType, MapStyleVariant, type PixelData, ReferenceMapStyle, ServiceError, type StaticMapBaseOptions, type StaticMapMarker, type TileJSON, type XYZ, bufferToPixelDataBrowser, circumferenceAtLatitude, coordinates, data, elevation, expandMapStyle, geolocation, getBufferToPixelDataParser, getTileCache, mapStylePresetList, math, misc, staticMaps, styleToStyle, type LanguageInfo, areSameLanguages, toLanguageInfo, isLanguageInfo, getAutoLanguage, getLanguageInfoFromFlag, getLanguageInfoFromCode, getLanguageInfoFromKey, canParsePixelData, } from '@maptiler/client';
92
91
  export * from './ImageViewer';
93
92
  export { getWebGLSupportError, displayWebGLContextLostWarning } from './tools';
94
93
  export { config, SdkConfig } from './config';