@mapmap/maps 0.10.1 → 0.11.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.
- package/README.md +41 -1
- package/dist/index.d.ts +128 -1
- package/dist/index.js +144 -8
- package/dist/index.js.map +1 -1
- package/llms-sdk.txt +25 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -458,13 +458,48 @@ const decision = await adr.check({ hazmat: true, tunnelCode: "C", tunnelCategory
|
|
|
458
458
|
// { status: "allowed" | "blocked", reason?, raw }
|
|
459
459
|
```
|
|
460
460
|
|
|
461
|
+
### `class Geocoder` - search and reverse lookup
|
|
462
|
+
|
|
463
|
+
Typed access to the gateway's `GET /geocode` and `GET /geocode/reverse`
|
|
464
|
+
endpoints - a search box or "what did the user tap" lookup needs no
|
|
465
|
+
hand-rolled HTTP. Pass the map to reuse its `baseUrl`/`apiKey`, or
|
|
466
|
+
`{ baseUrl, apiKey }` to use it without a map (no MapLibre dependency):
|
|
467
|
+
|
|
468
|
+
```ts
|
|
469
|
+
import { Geocoder } from "@mapmap/maps";
|
|
470
|
+
|
|
471
|
+
const geocoder = new Geocoder(map); // or { baseUrl: "https://api.mapmap.ai", apiKey: "snk_…" }
|
|
472
|
+
|
|
473
|
+
// Forward: free-text → hits, best first. Bias towards the map centre.
|
|
474
|
+
const hits = await geocoder.geocode("tate modern", {
|
|
475
|
+
bias: map.map.getCenter(),
|
|
476
|
+
limit: 5,
|
|
477
|
+
});
|
|
478
|
+
// hits[0]: { lngLat: [lng, lat], name, kind, street, city, postcode,
|
|
479
|
+
// categories?, details?, id?, raw }
|
|
480
|
+
|
|
481
|
+
// Reverse: point → nearest hits. kinds/categories/name are the
|
|
482
|
+
// first-party filters ("nearest cafe", "nearest Lloyds bank").
|
|
483
|
+
const places = await geocoder.reverse(evt.lngLat, { kinds: ["poi"] });
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
Errors surface the gateway's problem+json `title`/`detail`; a 501 is
|
|
487
|
+
reported as "geocoding is not enabled on this deployment" (self-host
|
|
488
|
+
without a geocoding backend), not as a bad request.
|
|
489
|
+
|
|
461
490
|
### Pure helpers (no browser required)
|
|
462
491
|
|
|
463
492
|
Exported for server-side or test use - none of these touch MapLibre:
|
|
464
493
|
|
|
465
494
|
- `buildStyle({ theme, territoryTilesUrl })` → a MapLibre `StyleSpecification`.
|
|
466
495
|
- `buildRouteUrl(baseUrl, profile, points, truck?)` / `buildRouteQuery(truck?)`.
|
|
496
|
+
Note the API key is NOT embedded in the URL: fetch it yourself and add the
|
|
497
|
+
`Authorization: Bearer snk_…` header (`RouteLayer` does this internally).
|
|
467
498
|
- `parseOsrmRoute(body)` → `ParsedRoute`.
|
|
499
|
+
- `buildGeocodeUrl(baseUrl, query, opts?)` /
|
|
500
|
+
`buildReverseGeocodeUrl(baseUrl, point, opts?)` /
|
|
501
|
+
`parseGeocodeResponse(body)` → `GeocodeHit[]`. Same auth note as
|
|
502
|
+
`buildRouteUrl`.
|
|
468
503
|
- `toLngLat` / `formatCoord` / `formatCoords` - coordinate normalisation.
|
|
469
504
|
- `haversineDistanceM(a, b)` - straight-line distance in metres.
|
|
470
505
|
- `placesFromGeoJSON(collection)` - GeoJSON Points → `Place[]`.
|
|
@@ -777,7 +812,12 @@ and `"N min"` labels, survives theme swaps, and resolves to the raw GeoJSON
|
|
|
777
812
|
The map diagnoses the classic silent failures at construction and logs ONE
|
|
778
813
|
actionable `console.error` per issue per page, each with a docs link:
|
|
779
814
|
|
|
780
|
-
- `[container-zero-height]` - the 0px container (top blank-map cause)
|
|
815
|
+
- `[container-zero-height]` - the 0px container (top blank-map cause).
|
|
816
|
+
Watch for CSS cascade layers here: Tailwind v4 utilities live in a
|
|
817
|
+
layer, unlayered maplibre-gl.css does not, so `absolute inset-0` on the
|
|
818
|
+
container silently loses to `.maplibregl-map { position: relative }`.
|
|
819
|
+
Use inline styles for the container's position/size, or import
|
|
820
|
+
maplibre-gl.css into a CSS layer.
|
|
781
821
|
- `[container-detached]` - container not in the DOM
|
|
782
822
|
- `[duplicate-maplibre]` - two maplibre-gl copies on one page
|
|
783
823
|
- `[webgl-unavailable]` - no WebGL context available
|
package/dist/index.d.ts
CHANGED
|
@@ -2871,7 +2871,18 @@ declare class NavigationCamera {
|
|
|
2871
2871
|
private lastRoute;
|
|
2872
2872
|
private recentreTimer;
|
|
2873
2873
|
private destroyed;
|
|
2874
|
+
/** Whether the current free-mode gesture actually moved the map. */
|
|
2875
|
+
private movedWhileFree;
|
|
2874
2876
|
private readonly onInteraction;
|
|
2877
|
+
/** A user-driven move between pointer-down and pointer-up: a real drag. */
|
|
2878
|
+
private readonly onUserMove;
|
|
2879
|
+
/**
|
|
2880
|
+
* Pointer-up. Taking the camera on pointer-down is what lets a drag
|
|
2881
|
+
* start at all, but it would also mean a plain tap — picking a place on
|
|
2882
|
+
* the map, say — silently stopped the chase for the whole idle period.
|
|
2883
|
+
* So a gesture that never actually moved the map hands it straight back.
|
|
2884
|
+
*/
|
|
2885
|
+
private readonly onGestureEnd;
|
|
2875
2886
|
/**
|
|
2876
2887
|
* `false` when the map runs the globe (or vertical-perspective)
|
|
2877
2888
|
* projection, whose camera geometry breaks the low-anchor offset maths
|
|
@@ -3207,6 +3218,122 @@ declare class AdrCheck {
|
|
|
3207
3218
|
check(request: AdrCheckRequest): Promise<AdrCheckResult>;
|
|
3208
3219
|
}
|
|
3209
3220
|
|
|
3221
|
+
/** The document kinds the reverse endpoint can filter by. */
|
|
3222
|
+
type GeocodeKind = "address" | "street" | "locality" | "poi" | "postcode";
|
|
3223
|
+
/** Options for forward geocoding (`GET /geocode`). */
|
|
3224
|
+
interface GeocodeOptions {
|
|
3225
|
+
/** Maximum results, 1-10. */
|
|
3226
|
+
limit?: number;
|
|
3227
|
+
/** Result language, e.g. `"en"`, `"de"`, `"fr"`. */
|
|
3228
|
+
lang?: string;
|
|
3229
|
+
/**
|
|
3230
|
+
* Location bias: reorders candidates towards this point, never excludes
|
|
3231
|
+
* one. The map centre is the natural value for a search box.
|
|
3232
|
+
*/
|
|
3233
|
+
bias?: LngLatLike;
|
|
3234
|
+
/**
|
|
3235
|
+
* Map zoom (0-20) controlling the bias strength: zoomed in favours
|
|
3236
|
+
* nearby results, zoomed out favours prominence. Only meaningful with
|
|
3237
|
+
* `bias`.
|
|
3238
|
+
*/
|
|
3239
|
+
zoom?: number;
|
|
3240
|
+
/**
|
|
3241
|
+
* Hard bounding-box filter, `[minLon, minLat, maxLon, maxLat]` (WGS84).
|
|
3242
|
+
* Unlike `bias` this excludes results outside the box outright.
|
|
3243
|
+
*/
|
|
3244
|
+
bbox?: [number, number, number, number];
|
|
3245
|
+
}
|
|
3246
|
+
/** Options for reverse geocoding (`GET /geocode/reverse`). */
|
|
3247
|
+
interface ReverseGeocodeOptions {
|
|
3248
|
+
/** Maximum results. */
|
|
3249
|
+
limit?: number;
|
|
3250
|
+
/**
|
|
3251
|
+
* Restrict hits to these kinds. `["poi"]` is the "what place did the
|
|
3252
|
+
* user tap" lookup. First-party backend only.
|
|
3253
|
+
*/
|
|
3254
|
+
kinds?: GeocodeKind[];
|
|
3255
|
+
/**
|
|
3256
|
+
* Category browse: the nearest places of these categories, nearest
|
|
3257
|
+
* first (`["cafe"]`, `["fuel", "charging_station"]`). Implies
|
|
3258
|
+
* `kinds=poi`. First-party backend only.
|
|
3259
|
+
*/
|
|
3260
|
+
categories?: string[];
|
|
3261
|
+
/**
|
|
3262
|
+
* Restrict hits to places of this name or brand, nearest first - the
|
|
3263
|
+
* "nearest Lloyds bank" question. First-party backend only.
|
|
3264
|
+
*/
|
|
3265
|
+
name?: string;
|
|
3266
|
+
}
|
|
3267
|
+
/** One geocode result, flattened from the wire FeatureCollection. */
|
|
3268
|
+
interface GeocodeHit {
|
|
3269
|
+
/** `[lng, lat]` - GeoJSON order, ready for a MapLibre camera or marker. */
|
|
3270
|
+
lngLat: [number, number];
|
|
3271
|
+
/** Display name (`properties.name`), when the hit carries one. */
|
|
3272
|
+
name?: string;
|
|
3273
|
+
/** Stable id (`osm:…`), first-party backend only. */
|
|
3274
|
+
id?: string;
|
|
3275
|
+
/** Document kind: `poi`, `address`, `street`, `locality`, `postcode`, … */
|
|
3276
|
+
kind?: string;
|
|
3277
|
+
/** Address parts, present when known. */
|
|
3278
|
+
housenumber?: string;
|
|
3279
|
+
street?: string;
|
|
3280
|
+
city?: string;
|
|
3281
|
+
postcode?: string;
|
|
3282
|
+
state?: string;
|
|
3283
|
+
country?: string;
|
|
3284
|
+
countrycode?: string;
|
|
3285
|
+
/** POI categories, e.g. `["arts_centre"]`. */
|
|
3286
|
+
categories?: string[];
|
|
3287
|
+
/** Distance from the query point in metres - reverse hits only. */
|
|
3288
|
+
distanceM?: number;
|
|
3289
|
+
/**
|
|
3290
|
+
* Curated OSM display attributes on first-party POI hits:
|
|
3291
|
+
* `opening_hours`, `phone`, `website`, `brand`, `wheelchair`, EV
|
|
3292
|
+
* `socket:*` connectors and friends. Keys absent in OSM are omitted.
|
|
3293
|
+
*/
|
|
3294
|
+
details?: Record<string, unknown>;
|
|
3295
|
+
/** The raw GeoJSON feature, for anything not modelled above. */
|
|
3296
|
+
raw: Record<string, unknown>;
|
|
3297
|
+
}
|
|
3298
|
+
/**
|
|
3299
|
+
* Build the full forward-geocode URL. `baseUrl` is the gateway origin
|
|
3300
|
+
* (trailing slashes are trimmed). Note the API key is NOT embedded -
|
|
3301
|
+
* fetches of this URL need the `Authorization: Bearer snk_…` header,
|
|
3302
|
+
* exactly like {@link buildRouteUrl}.
|
|
3303
|
+
*/
|
|
3304
|
+
declare function buildGeocodeUrl(baseUrl: string, query: string, options?: GeocodeOptions): string;
|
|
3305
|
+
/** Build the full reverse-geocode URL. Same auth caveat as forward. */
|
|
3306
|
+
declare function buildReverseGeocodeUrl(baseUrl: string, point: LngLatLike, options?: ReverseGeocodeOptions): string;
|
|
3307
|
+
/**
|
|
3308
|
+
* Parse a geocode response body (either endpoint) into {@link GeocodeHit}s.
|
|
3309
|
+
* Throws when the body is not a FeatureCollection. Features without a
|
|
3310
|
+
* Point geometry are skipped: the gateway only emits Points, so anything
|
|
3311
|
+
* else is not a hit this parser can represent.
|
|
3312
|
+
*/
|
|
3313
|
+
declare function parseGeocodeResponse(body: unknown): GeocodeHit[];
|
|
3314
|
+
/**
|
|
3315
|
+
* What the Geocoder needs. A `MapMapMap` satisfies this shape, so
|
|
3316
|
+
* `new Geocoder(map)` reuses the map's gateway origin and key - the same
|
|
3317
|
+
* convention as every other SDK class.
|
|
3318
|
+
*/
|
|
3319
|
+
interface GeocoderOptions {
|
|
3320
|
+
/** Gateway base URL, e.g. `https://api.mapmap.ai`. */
|
|
3321
|
+
baseUrl: string;
|
|
3322
|
+
/** Gateway API key (`snk_…`). */
|
|
3323
|
+
apiKey?: string | undefined;
|
|
3324
|
+
}
|
|
3325
|
+
/** Calls the gateway's geocoding endpoints and returns parsed hits. */
|
|
3326
|
+
declare class Geocoder {
|
|
3327
|
+
private readonly baseUrl;
|
|
3328
|
+
private readonly apiKey;
|
|
3329
|
+
constructor(options: GeocoderOptions);
|
|
3330
|
+
/** Forward geocode: free-text query → hits, best first. */
|
|
3331
|
+
geocode(query: string, options?: GeocodeOptions): Promise<GeocodeHit[]>;
|
|
3332
|
+
/** Reverse geocode: point → nearest hits, nearest first. */
|
|
3333
|
+
reverse(point: LngLatLike, options?: ReverseGeocodeOptions): Promise<GeocodeHit[]>;
|
|
3334
|
+
private request;
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3210
3337
|
/** Guidance-related query options. */
|
|
3211
3338
|
interface GuidanceQuery {
|
|
3212
3339
|
voice?: boolean;
|
|
@@ -3754,4 +3881,4 @@ declare class VoiceGuidance {
|
|
|
3754
3881
|
private playEarcon;
|
|
3755
3882
|
}
|
|
3756
3883
|
|
|
3757
|
-
export { ALERT_CONTRAST_MIN, AdrCheck, type AdrCheckOptions, type AdrCheckRequest, type AdrCheckResult, type AdrDimensions, type AdrTunnelCategory, type AlertChipContent, type AlertContrastIssue, type AlertPresentation, type AttributionPosition, BAKED_MARKERS_GLYPH_ID, type BannerComponent, type BannerContent, type BannerInstruction, type BuildStyleOptions, type CameraAlert, CameraAlertChip, type CameraFix, DEFAULT_GLYPHS_URL, DEFAULT_TERRAIN_ATTRIBUTION, DEFAULT_TERRAIN_URL, DEFAULT_TERRITORY_TILES_URL, type DiagnosticIssue, EFFECTS_METADATA_KEY, type EndpointMarker, type EndpointsDesign, FLOW_DEFAULTS, FULL_ATTRIBUTION, FlowRouteEffectLayer, type FlythroughController, type FlythroughOptions, type FlythroughPose, GuidanceBanner, type GuidanceSeverity, type GuidanceSpokenPrompt, type IsochroneFeatureCollection, IsochroneLayer, type IsochroneLayerOptions, LOGO_SVG, type LaneIndication, type LayerOverride, type LngLatLike, LogoControl, type LogoOptions, type LogoPosition, MARKERS_ID, MARKER_DEFAULT_COLOUR, MARKER_GLYPH_IDS, MARKER_GLYPH_VIEWBOX, MARKER_LABEL_TEXT_SIZES, MARKER_PIN_BODY_PATH, MARKER_SIZES, MARKER_SIZES_PX, MAX_MARKER_ID_LENGTH, MAX_MARKER_IMAGE_BYTES, MAX_MARKER_ITEMS, MAX_MARKER_LABEL_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_PUCK_IMAGE_BYTES, type MapDiagnosticsInput, type MapDisplayMode, MapMapMap, type MapMapOptions, type MapMapTheme, type MarkerGlyphId, type MarkerItem, type MarkerSize, type MarkersBlock, MarkersLayer, type MarkersLayerIds, type MarkersLayerOptions, NAV_ALERT_AUDIO_MODES, NAV_ALERT_CHIP_POSITIONS, NAV_ALERT_ICON_SETS, NAV_ALERT_LEAD_DISTANCES, NAV_ALERT_LEAD_DISTANCE_M, NAV_ALERT_MODES, NAV_ALERT_SOUNDS, NAV_ALERT_SOUND_BASE_URL, NAV_ALERT_SOUND_FILES, NAV_CAMERA_DEFAULTS, NAV_CAMERA_KINDS, type NavAlertAudioMode, type NavAlertChipPosition, type NavAlertIconSet, type NavAlertKindDesign, type NavAlertLeadDistance, type NavAlertMode, type NavAlertSound, type NavAlertsDesign, type NavBannerDesign, type NavCameraDesign, type NavCameraKind, type NavDesign, type NavPuckDesign, type NavRouteDesign, NavigationCamera, type NavigationCameraMode, type NavigationCameraOptions, type NearestByDriveTimeOptions, OPENMAPTILES_ATTRIBUTION, OSM_ATTRIBUTION, PALETTE_SLOTS, POI_CATEGORY_COLORS, POI_CATEGORY_IDS, POI_CLASS_CATEGORIES, type ParsedRoute, type Place, type PlacePointFeature, type PlaceWithDistance, type PlaceWithDriveTime, type PlacesFeatureCollection, type PlacesIcon, type PlacesInput, type PlacesLabelOptions, PlacesLayer, type PlacesLayerIds, type PlacesLayerOptions, type PlacesSelectOptions, type PoiCategoryDesign, type PoiDesign, PositionPuck, type PositionPuckOptions, type ProbeUploadOutcome, RIBBON_FLOATS_PER_VERTEX, ROUTE_EFFECTS, type ReachabilityMode, type RenderMarkerImageOptions, type RenderedMarkerImage, type RibbonMesh, type RouteEffectLayer, type RouteEffectName, type RouteFlowOptions, type RouteGeometry, RouteLayer, type RouteLayerIds, type RouteLayerOptions, type RouteLineStyle, type RouteOptions, type RouteProfile, SIGNAL_BLUE, SOURCE_LAYERS, type SetRouteEffectOptions, type SeverityProsody, type ShowReachabilityOptions, type SpeakOptions, type StepGuidance, type SunTimes, type TerrainOptions, type Theme, type ThemeEffects, ThemeScheduler, type ThemeSchedulerOptions, type TruckParams, type UploadProbeOptions, VoiceGuidance, type VoiceGuidanceOptions, type VoiceGuidanceUpdate, type VoiceInstruction, alertChipContent, alertContrastIssues, alertIconSvg, alertIconUrl, alertPresentation, alertSoundUrl, alertSpeedReadoutColor, applyPoiDesign, applyTerrain, bannerLanes, bearingBetween, bindFlythroughToScroll, buildAdrCheckBody, buildProbeUrl, buildRouteQuery, buildRouteUrl, buildStyle, builtInPoiColor, cameraKindLabel, cameraKindsShownOnMap, cameraShownOnMap, cameraSpriteName, cameraSymbolLayer, contrastRatio, createMap, createRouteEffect, defaultNavAlertsDesign, defaultNavDesign, defaultPoiDesign, directionArrow, effectsFromStyleMetadata, extractGuidance, flythrough, flythroughPose, formatCoord, formatCoords, hasBakedMarkers, haversineDistanceM, isMarkerGlyphId, isNameTextField, laneArrowDirection, languageTextField, lngLatToMercator, markerGlyphPaths, markerImage, markerImageDataKey, markerImageKey, markerText, markerTextImageKey, markersFromTheme, markersFromThemeUrl, navAlertLeadDistanceM, navAlertSoundUrl, navCameraKind, navDesignFromTheme, navDesignFromThemeUrl, parseCssColour, parseHexColor, parseMarkers, parseNavAlertsDesign, parseNavDesign, parseOsrmRoute, parsePoiDesign, placesFromGeoJSON, poiDesignFromTheme, poiDesignFromThemeUrl, poiDesignIsDefault, poiTextColorExpression, prefersReducedMotion, registerPmtilesProtocol, relativeLuminance, removeTerrain, renderMarkerImage, resetDiagnostics, resolveTerrain, resolveTheme, runMapDiagnostics, setMapLanguage, severityProsody, shortestArcDeg, shortestArcDelta, speak, ssmlToText, sunTimes, tessellateRouteRibbon, toLngLat, toPmtilesUrl, truncateChars, uploadProbeBatch };
|
|
3884
|
+
export { ALERT_CONTRAST_MIN, AdrCheck, type AdrCheckOptions, type AdrCheckRequest, type AdrCheckResult, type AdrDimensions, type AdrTunnelCategory, type AlertChipContent, type AlertContrastIssue, type AlertPresentation, type AttributionPosition, BAKED_MARKERS_GLYPH_ID, type BannerComponent, type BannerContent, type BannerInstruction, type BuildStyleOptions, type CameraAlert, CameraAlertChip, type CameraFix, DEFAULT_GLYPHS_URL, DEFAULT_TERRAIN_ATTRIBUTION, DEFAULT_TERRAIN_URL, DEFAULT_TERRITORY_TILES_URL, type DiagnosticIssue, EFFECTS_METADATA_KEY, type EndpointMarker, type EndpointsDesign, FLOW_DEFAULTS, FULL_ATTRIBUTION, FlowRouteEffectLayer, type FlythroughController, type FlythroughOptions, type FlythroughPose, type GeocodeHit, type GeocodeKind, type GeocodeOptions, Geocoder, type GeocoderOptions, GuidanceBanner, type GuidanceSeverity, type GuidanceSpokenPrompt, type IsochroneFeatureCollection, IsochroneLayer, type IsochroneLayerOptions, LOGO_SVG, type LaneIndication, type LayerOverride, type LngLatLike, LogoControl, type LogoOptions, type LogoPosition, MARKERS_ID, MARKER_DEFAULT_COLOUR, MARKER_GLYPH_IDS, MARKER_GLYPH_VIEWBOX, MARKER_LABEL_TEXT_SIZES, MARKER_PIN_BODY_PATH, MARKER_SIZES, MARKER_SIZES_PX, MAX_MARKER_ID_LENGTH, MAX_MARKER_IMAGE_BYTES, MAX_MARKER_ITEMS, MAX_MARKER_LABEL_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_PUCK_IMAGE_BYTES, type MapDiagnosticsInput, type MapDisplayMode, MapMapMap, type MapMapOptions, type MapMapTheme, type MarkerGlyphId, type MarkerItem, type MarkerSize, type MarkersBlock, MarkersLayer, type MarkersLayerIds, type MarkersLayerOptions, NAV_ALERT_AUDIO_MODES, NAV_ALERT_CHIP_POSITIONS, NAV_ALERT_ICON_SETS, NAV_ALERT_LEAD_DISTANCES, NAV_ALERT_LEAD_DISTANCE_M, NAV_ALERT_MODES, NAV_ALERT_SOUNDS, NAV_ALERT_SOUND_BASE_URL, NAV_ALERT_SOUND_FILES, NAV_CAMERA_DEFAULTS, NAV_CAMERA_KINDS, type NavAlertAudioMode, type NavAlertChipPosition, type NavAlertIconSet, type NavAlertKindDesign, type NavAlertLeadDistance, type NavAlertMode, type NavAlertSound, type NavAlertsDesign, type NavBannerDesign, type NavCameraDesign, type NavCameraKind, type NavDesign, type NavPuckDesign, type NavRouteDesign, NavigationCamera, type NavigationCameraMode, type NavigationCameraOptions, type NearestByDriveTimeOptions, OPENMAPTILES_ATTRIBUTION, OSM_ATTRIBUTION, PALETTE_SLOTS, POI_CATEGORY_COLORS, POI_CATEGORY_IDS, POI_CLASS_CATEGORIES, type ParsedRoute, type Place, type PlacePointFeature, type PlaceWithDistance, type PlaceWithDriveTime, type PlacesFeatureCollection, type PlacesIcon, type PlacesInput, type PlacesLabelOptions, PlacesLayer, type PlacesLayerIds, type PlacesLayerOptions, type PlacesSelectOptions, type PoiCategoryDesign, type PoiDesign, PositionPuck, type PositionPuckOptions, type ProbeUploadOutcome, RIBBON_FLOATS_PER_VERTEX, ROUTE_EFFECTS, type ReachabilityMode, type RenderMarkerImageOptions, type RenderedMarkerImage, type ReverseGeocodeOptions, type RibbonMesh, type RouteEffectLayer, type RouteEffectName, type RouteFlowOptions, type RouteGeometry, RouteLayer, type RouteLayerIds, type RouteLayerOptions, type RouteLineStyle, type RouteOptions, type RouteProfile, SIGNAL_BLUE, SOURCE_LAYERS, type SetRouteEffectOptions, type SeverityProsody, type ShowReachabilityOptions, type SpeakOptions, type StepGuidance, type SunTimes, type TerrainOptions, type Theme, type ThemeEffects, ThemeScheduler, type ThemeSchedulerOptions, type TruckParams, type UploadProbeOptions, VoiceGuidance, type VoiceGuidanceOptions, type VoiceGuidanceUpdate, type VoiceInstruction, alertChipContent, alertContrastIssues, alertIconSvg, alertIconUrl, alertPresentation, alertSoundUrl, alertSpeedReadoutColor, applyPoiDesign, applyTerrain, bannerLanes, bearingBetween, bindFlythroughToScroll, buildAdrCheckBody, buildGeocodeUrl, buildProbeUrl, buildReverseGeocodeUrl, buildRouteQuery, buildRouteUrl, buildStyle, builtInPoiColor, cameraKindLabel, cameraKindsShownOnMap, cameraShownOnMap, cameraSpriteName, cameraSymbolLayer, contrastRatio, createMap, createRouteEffect, defaultNavAlertsDesign, defaultNavDesign, defaultPoiDesign, directionArrow, effectsFromStyleMetadata, extractGuidance, flythrough, flythroughPose, formatCoord, formatCoords, hasBakedMarkers, haversineDistanceM, isMarkerGlyphId, isNameTextField, laneArrowDirection, languageTextField, lngLatToMercator, markerGlyphPaths, markerImage, markerImageDataKey, markerImageKey, markerText, markerTextImageKey, markersFromTheme, markersFromThemeUrl, navAlertLeadDistanceM, navAlertSoundUrl, navCameraKind, navDesignFromTheme, navDesignFromThemeUrl, parseCssColour, parseGeocodeResponse, parseHexColor, parseMarkers, parseNavAlertsDesign, parseNavDesign, parseOsrmRoute, parsePoiDesign, placesFromGeoJSON, poiDesignFromTheme, poiDesignFromThemeUrl, poiDesignIsDefault, poiTextColorExpression, prefersReducedMotion, registerPmtilesProtocol, relativeLuminance, removeTerrain, renderMarkerImage, resetDiagnostics, resolveTerrain, resolveTheme, runMapDiagnostics, setMapLanguage, severityProsody, shortestArcDeg, shortestArcDelta, speak, ssmlToText, sunTimes, tessellateRouteRibbon, toLngLat, toPmtilesUrl, truncateChars, uploadProbeBatch };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import maplibregl from 'maplibre-gl';
|
|
|
4
4
|
import { Protocol } from 'pmtiles';
|
|
5
5
|
|
|
6
6
|
// src/diagnostics.ts
|
|
7
|
-
var DOCS = "https://mapmap.ai/docs";
|
|
7
|
+
var DOCS = "https://mapmap.ai/docs/maps";
|
|
8
8
|
var reported = /* @__PURE__ */ new Set();
|
|
9
9
|
var MAPLIBRE_REGISTRY_KEY = /* @__PURE__ */ Symbol.for("mapmap.maplibre-instances");
|
|
10
10
|
function resetDiagnostics() {
|
|
@@ -36,14 +36,14 @@ function checkContainer(container) {
|
|
|
36
36
|
if (!element.isConnected) {
|
|
37
37
|
report(
|
|
38
38
|
"container-detached",
|
|
39
|
-
`the map container element is not attached to the DOM, so nothing can render. Append it to the document before constructing the map. ${DOCS}#container`
|
|
39
|
+
`the map container element is not attached to the DOM, so nothing can render. Append it to the document before constructing the map. ${DOCS}#container-not-in-the-dom`
|
|
40
40
|
);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
if (element.clientHeight === 0) {
|
|
44
44
|
report(
|
|
45
45
|
"container-zero-height",
|
|
46
|
-
`the map container's height is 0px, so MapLibre is rendering into an invisible canvas (no error, no map). Give it a real height, e.g. #map { height: 100vh; }. If the height arrives later (CSS load, layout), you can ignore this. ${DOCS}#
|
|
46
|
+
`the map container's height is 0px, so MapLibre is rendering into an invisible canvas (no error, no map). Give it a real height, e.g. #map { height: 100vh; }. Sizing the container with CSS-layer framework utilities (e.g. Tailwind v4 \`absolute inset-0\`) does not work: maplibre-gl.css is unlayered, so its \`.maplibregl-map { position: relative }\` beats any layered utility and collapses the container - use inline styles for the container's position/size, or import maplibre-gl.css into a CSS layer. If the height arrives later (CSS load, layout), you can ignore this. ${DOCS}#zero-height-container`
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -60,7 +60,7 @@ function checkDuplicateMaplibre(maplibre) {
|
|
|
60
60
|
if (registry.size > 1) {
|
|
61
61
|
report(
|
|
62
62
|
"duplicate-maplibre",
|
|
63
|
-
`two different maplibre-gl instances are loaded on this page (duplicate dependency, a CDN <script> next to the bundled copy, or micro-frontends). Maps, styles and the pmtiles protocol registration will not be shared between them. De-duplicate so the app owns a single maplibre-gl - it is a peerDependency of @mapmap/maps for exactly this reason. ${DOCS}#
|
|
63
|
+
`two different maplibre-gl instances are loaded on this page (duplicate dependency, a CDN <script> next to the bundled copy, or micro-frontends). Maps, styles and the pmtiles protocol registration will not be shared between them. De-duplicate so the app owns a single maplibre-gl - it is a peerDependency of @mapmap/maps for exactly this reason. ${DOCS}#two-maplibre-gl-copies`
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -72,7 +72,7 @@ function checkWebgl() {
|
|
|
72
72
|
if (!gl) {
|
|
73
73
|
report(
|
|
74
74
|
"webgl-unavailable",
|
|
75
|
-
`this browser/environment reports no WebGL support, so the map cannot render. Common causes: headless browsers without --use-gl, blocked GPU/hardware acceleration, remote desktops. ${DOCS}#webgl`
|
|
75
|
+
`this browser/environment reports no WebGL support, so the map cannot render. Common causes: headless browsers without --use-gl, blocked GPU/hardware acceleration, remote desktops. ${DOCS}#webgl-unavailable`
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
} catch {
|
|
@@ -89,7 +89,7 @@ function watchForAuthFailures(map, apiKey) {
|
|
|
89
89
|
if (basemapMissing) {
|
|
90
90
|
report(
|
|
91
91
|
"basemap-not-found",
|
|
92
|
-
`the basemap tiles returned HTTP 404, so the map renders blank. The territory tiles URL points at a file that does not exist. Check \`territoryTilesUrl\` (or your custom \`style\`) - the default MapMap tiles are served at the CDN root (e.g. https://tiles.mapmap.ai/planet.pmtiles), not under a /territories/ prefix. ${DOCS}#tiles`
|
|
92
|
+
`the basemap tiles returned HTTP 404, so the map renders blank. The territory tiles URL points at a file that does not exist. Check \`territoryTilesUrl\` (or your custom \`style\`) - the default MapMap tiles are served at the CDN root (e.g. https://tiles.mapmap.ai/planet.pmtiles), not under a /territories/ prefix. ${DOCS}#basemap-tiles-404`
|
|
93
93
|
);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -97,7 +97,7 @@ function watchForAuthFailures(map, apiKey) {
|
|
|
97
97
|
if (!unauthorised) return;
|
|
98
98
|
report(
|
|
99
99
|
"invalid-api-key",
|
|
100
|
-
apiKey ? `the gateway rejected your API key (HTTP 401). Check the \`apiKey\` for typos or revocation - keys look like "snk_\u2026". ${DOCS}#
|
|
100
|
+
apiKey ? `the gateway rejected your API key (HTTP 401). Check the \`apiKey\` for typos or revocation - keys look like "snk_\u2026". ${DOCS}#401-unauthorised` : `a request was rejected with HTTP 401 and no \`apiKey\` was configured. Pass one to the map (\`new MapMapMap({ apiKey: "snk_\u2026" })\`) - issue a free key with POST https://api.mapmap.ai/v1/keys. ${DOCS}#401-unauthorised`
|
|
101
101
|
);
|
|
102
102
|
});
|
|
103
103
|
} catch {
|
|
@@ -4708,7 +4708,11 @@ function firstRow(value) {
|
|
|
4708
4708
|
}
|
|
4709
4709
|
|
|
4710
4710
|
// src/camera.ts
|
|
4711
|
+
var GESTURE_END_EVENTS = ["mouseup", "touchend", "touchcancel"];
|
|
4711
4712
|
var INTERACTION_EVENTS = [
|
|
4713
|
+
"mousedown",
|
|
4714
|
+
"touchstart",
|
|
4715
|
+
"wheel",
|
|
4712
4716
|
"dragstart",
|
|
4713
4717
|
"rotatestart",
|
|
4714
4718
|
"pitchstart",
|
|
@@ -4727,13 +4731,33 @@ var NavigationCamera = class {
|
|
|
4727
4731
|
constructor(map, options = {}) {
|
|
4728
4732
|
this.currentMode = "follow";
|
|
4729
4733
|
this.destroyed = false;
|
|
4734
|
+
/** Whether the current free-mode gesture actually moved the map. */
|
|
4735
|
+
this.movedWhileFree = false;
|
|
4730
4736
|
// Bound once so `off` in destroy() removes exactly what `on` added.
|
|
4731
4737
|
this.onInteraction = (ev) => {
|
|
4732
4738
|
if (!ev?.originalEvent || this.destroyed) return;
|
|
4739
|
+
this.movedWhileFree = false;
|
|
4733
4740
|
this.currentMode = "free";
|
|
4734
4741
|
this.m.stop();
|
|
4735
4742
|
this.scheduleRecentre();
|
|
4736
4743
|
};
|
|
4744
|
+
/** A user-driven move between pointer-down and pointer-up: a real drag. */
|
|
4745
|
+
this.onUserMove = (ev) => {
|
|
4746
|
+
if (!ev?.originalEvent || this.destroyed) return;
|
|
4747
|
+
this.movedWhileFree = true;
|
|
4748
|
+
};
|
|
4749
|
+
/**
|
|
4750
|
+
* Pointer-up. Taking the camera on pointer-down is what lets a drag
|
|
4751
|
+
* start at all, but it would also mean a plain tap — picking a place on
|
|
4752
|
+
* the map, say — silently stopped the chase for the whole idle period.
|
|
4753
|
+
* So a gesture that never actually moved the map hands it straight back.
|
|
4754
|
+
*/
|
|
4755
|
+
this.onGestureEnd = () => {
|
|
4756
|
+
if (this.destroyed || this.currentMode !== "free") return;
|
|
4757
|
+
if (this.movedWhileFree) return;
|
|
4758
|
+
this.clearRecentreTimer();
|
|
4759
|
+
this.resume();
|
|
4760
|
+
};
|
|
4737
4761
|
this.m = map instanceof MapMapMap ? map.map : map;
|
|
4738
4762
|
const design = map instanceof MapMapMap ? map.navDesign?.camera : void 0;
|
|
4739
4763
|
this.pitch = clamp(options.pitch ?? design?.pitch ?? DEFAULT_PITCH, 0, 85);
|
|
@@ -4748,6 +4772,10 @@ var NavigationCamera = class {
|
|
|
4748
4772
|
for (const event of INTERACTION_EVENTS) {
|
|
4749
4773
|
this.m.on(event, this.onInteraction);
|
|
4750
4774
|
}
|
|
4775
|
+
for (const event of GESTURE_END_EVENTS) {
|
|
4776
|
+
this.m.on(event, this.onGestureEnd);
|
|
4777
|
+
}
|
|
4778
|
+
this.m.on("move", this.onUserMove);
|
|
4751
4779
|
}
|
|
4752
4780
|
/**
|
|
4753
4781
|
* `false` when the map runs the globe (or vertical-perspective)
|
|
@@ -4826,6 +4854,10 @@ var NavigationCamera = class {
|
|
|
4826
4854
|
for (const event of INTERACTION_EVENTS) {
|
|
4827
4855
|
this.m.off(event, this.onInteraction);
|
|
4828
4856
|
}
|
|
4857
|
+
for (const event of GESTURE_END_EVENTS) {
|
|
4858
|
+
this.m.off(event, this.onGestureEnd);
|
|
4859
|
+
}
|
|
4860
|
+
this.m.off("move", this.onUserMove);
|
|
4829
4861
|
}
|
|
4830
4862
|
easeToFix(fix, courseDeg, duration) {
|
|
4831
4863
|
this.m.easeTo({
|
|
@@ -5344,6 +5376,110 @@ var AdrCheck = class {
|
|
|
5344
5376
|
}
|
|
5345
5377
|
};
|
|
5346
5378
|
|
|
5379
|
+
// src/geocode.ts
|
|
5380
|
+
function lonLatParam(point) {
|
|
5381
|
+
const [lng, lat] = toLngLat(point);
|
|
5382
|
+
return `${lng},${lat}`;
|
|
5383
|
+
}
|
|
5384
|
+
function buildGeocodeUrl(baseUrl, query, options = {}) {
|
|
5385
|
+
const params = new URLSearchParams({ q: query });
|
|
5386
|
+
if (options.limit != null) params.set("limit", String(options.limit));
|
|
5387
|
+
if (options.lang != null) params.set("lang", options.lang);
|
|
5388
|
+
if (options.bias != null) params.set("bias", lonLatParam(options.bias));
|
|
5389
|
+
if (options.zoom != null) params.set("zoom", String(options.zoom));
|
|
5390
|
+
if (options.bbox != null) params.set("bbox", options.bbox.join(","));
|
|
5391
|
+
return `${baseUrl.replace(/\/+$/, "")}/geocode?${params.toString()}`;
|
|
5392
|
+
}
|
|
5393
|
+
function buildReverseGeocodeUrl(baseUrl, point, options = {}) {
|
|
5394
|
+
const [lng, lat] = toLngLat(point);
|
|
5395
|
+
const params = new URLSearchParams({ lon: String(lng), lat: String(lat) });
|
|
5396
|
+
if (options.limit != null) params.set("limit", String(options.limit));
|
|
5397
|
+
if (options.kinds?.length) params.set("kinds", options.kinds.join(","));
|
|
5398
|
+
if (options.categories?.length) {
|
|
5399
|
+
params.set("categories", options.categories.join(","));
|
|
5400
|
+
}
|
|
5401
|
+
if (options.name != null) params.set("name", options.name);
|
|
5402
|
+
return `${baseUrl.replace(/\/+$/, "")}/geocode/reverse?${params.toString()}`;
|
|
5403
|
+
}
|
|
5404
|
+
function parseGeocodeResponse(body) {
|
|
5405
|
+
if (typeof body !== "object" || body === null || body["type"] !== "FeatureCollection" || !Array.isArray(body["features"])) {
|
|
5406
|
+
throw new Error("geocode response was not a GeoJSON FeatureCollection");
|
|
5407
|
+
}
|
|
5408
|
+
const features = body.features;
|
|
5409
|
+
const hits = [];
|
|
5410
|
+
for (const feature of features) {
|
|
5411
|
+
if (typeof feature !== "object" || feature === null) continue;
|
|
5412
|
+
const f = feature;
|
|
5413
|
+
const geometry = f["geometry"];
|
|
5414
|
+
const coords = geometry?.["coordinates"];
|
|
5415
|
+
if (geometry?.["type"] !== "Point" || !Array.isArray(coords) || typeof coords[0] !== "number" || typeof coords[1] !== "number") {
|
|
5416
|
+
continue;
|
|
5417
|
+
}
|
|
5418
|
+
const props = f["properties"] ?? {};
|
|
5419
|
+
const str2 = (key) => typeof props[key] === "string" ? props[key] : void 0;
|
|
5420
|
+
const hit = { lngLat: [coords[0], coords[1]], raw: f };
|
|
5421
|
+
const name = str2("name");
|
|
5422
|
+
if (name !== void 0) hit.name = name;
|
|
5423
|
+
const id = str2("id");
|
|
5424
|
+
if (id !== void 0) hit.id = id;
|
|
5425
|
+
const kind = str2("type");
|
|
5426
|
+
if (kind !== void 0) hit.kind = kind;
|
|
5427
|
+
for (const key of [
|
|
5428
|
+
"housenumber",
|
|
5429
|
+
"street",
|
|
5430
|
+
"city",
|
|
5431
|
+
"postcode",
|
|
5432
|
+
"state",
|
|
5433
|
+
"country",
|
|
5434
|
+
"countrycode"
|
|
5435
|
+
]) {
|
|
5436
|
+
const value = str2(key);
|
|
5437
|
+
if (value !== void 0) hit[key] = value;
|
|
5438
|
+
}
|
|
5439
|
+
if (Array.isArray(props["categories"])) {
|
|
5440
|
+
hit.categories = props["categories"].filter(
|
|
5441
|
+
(c) => typeof c === "string"
|
|
5442
|
+
);
|
|
5443
|
+
}
|
|
5444
|
+
if (typeof props["distance_m"] === "number") {
|
|
5445
|
+
hit.distanceM = props["distance_m"];
|
|
5446
|
+
}
|
|
5447
|
+
if (typeof props["details"] === "object" && props["details"] !== null) {
|
|
5448
|
+
hit.details = props["details"];
|
|
5449
|
+
}
|
|
5450
|
+
hits.push(hit);
|
|
5451
|
+
}
|
|
5452
|
+
return hits;
|
|
5453
|
+
}
|
|
5454
|
+
var Geocoder = class {
|
|
5455
|
+
constructor(options) {
|
|
5456
|
+
this.baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
5457
|
+
this.apiKey = options.apiKey;
|
|
5458
|
+
}
|
|
5459
|
+
/** Forward geocode: free-text query → hits, best first. */
|
|
5460
|
+
geocode(query, options = {}) {
|
|
5461
|
+
return this.request(buildGeocodeUrl(this.baseUrl, query, options));
|
|
5462
|
+
}
|
|
5463
|
+
/** Reverse geocode: point → nearest hits, nearest first. */
|
|
5464
|
+
reverse(point, options = {}) {
|
|
5465
|
+
return this.request(buildReverseGeocodeUrl(this.baseUrl, point, options));
|
|
5466
|
+
}
|
|
5467
|
+
async request(url) {
|
|
5468
|
+
const headers = { Accept: "application/json" };
|
|
5469
|
+
if (this.apiKey) headers["Authorization"] = `Bearer ${this.apiKey}`;
|
|
5470
|
+
const response = await fetch(url, { headers });
|
|
5471
|
+
const body = await response.json().catch(() => null);
|
|
5472
|
+
if (!response.ok) {
|
|
5473
|
+
const problem = typeof body === "object" && body !== null ? body : void 0;
|
|
5474
|
+
const context = [problem?.["title"], problem?.["detail"]].filter((v) => typeof v === "string" && v.length > 0).join(" - ");
|
|
5475
|
+
throw new Error(
|
|
5476
|
+
response.status === 501 ? `geocoding is not enabled on this deployment (HTTP 501)${context ? ` (${context})` : ""}` : `geocoding failed: HTTP ${response.status}${context ? ` (${context})` : ""}`
|
|
5477
|
+
);
|
|
5478
|
+
}
|
|
5479
|
+
return parseGeocodeResponse(body);
|
|
5480
|
+
}
|
|
5481
|
+
};
|
|
5482
|
+
|
|
5347
5483
|
// src/guidance.ts
|
|
5348
5484
|
var CSS_COLOUR = /^(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|var)\((?:[\w\s.,%/#-]|\([\w\s.,%/#-]*\))*\)$/i;
|
|
5349
5485
|
function safeColour(value, fallback) {
|
|
@@ -5857,6 +5993,6 @@ function clampVolume(volume) {
|
|
|
5857
5993
|
return Math.min(1, Math.max(0, volume));
|
|
5858
5994
|
}
|
|
5859
5995
|
|
|
5860
|
-
export { ALERT_CONTRAST_MIN, AdrCheck, BAKED_MARKERS_GLYPH_ID, CameraAlertChip, DEFAULT_GLYPHS_URL, DEFAULT_TERRAIN_ATTRIBUTION, DEFAULT_TERRAIN_URL, DEFAULT_TERRITORY_TILES_URL, EFFECTS_METADATA_KEY, FLOW_DEFAULTS, FULL_ATTRIBUTION, FlowRouteEffectLayer, GuidanceBanner, IsochroneLayer, LOGO_SVG, LogoControl, MARKERS_ID, MARKER_DEFAULT_COLOUR, MARKER_GLYPH_IDS, MARKER_GLYPH_VIEWBOX, MARKER_LABEL_TEXT_SIZES, MARKER_PIN_BODY_PATH, MARKER_SIZES, MARKER_SIZES_PX, MAX_MARKER_ID_LENGTH, MAX_MARKER_IMAGE_BYTES, MAX_MARKER_ITEMS, MAX_MARKER_LABEL_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_PUCK_IMAGE_BYTES, MapMapMap, MarkersLayer, NAV_ALERT_AUDIO_MODES, NAV_ALERT_CHIP_POSITIONS, NAV_ALERT_ICON_SETS, NAV_ALERT_LEAD_DISTANCES, NAV_ALERT_LEAD_DISTANCE_M, NAV_ALERT_MODES, NAV_ALERT_SOUNDS, NAV_ALERT_SOUND_BASE_URL, NAV_ALERT_SOUND_FILES, NAV_CAMERA_DEFAULTS, NAV_CAMERA_KINDS, NavigationCamera, OPENMAPTILES_ATTRIBUTION, OSM_ATTRIBUTION, PALETTE_SLOTS, POI_CATEGORY_COLORS, POI_CATEGORY_IDS, POI_CLASS_CATEGORIES, PlacesLayer, PositionPuck, RIBBON_FLOATS_PER_VERTEX, ROUTE_EFFECTS, RouteLayer, SIGNAL_BLUE, SOURCE_LAYERS, ThemeScheduler, VoiceGuidance, alertChipContent, alertContrastIssues, alertIconSvg, alertIconUrl, alertPresentation, alertSoundUrl, alertSpeedReadoutColor, applyPoiDesign, applyTerrain, bannerLanes, bearingBetween, bindFlythroughToScroll, buildAdrCheckBody, buildProbeUrl, buildRouteQuery, buildRouteUrl, buildStyle, builtInPoiColor, cameraKindLabel, cameraKindsShownOnMap, cameraShownOnMap, cameraSpriteName, cameraSymbolLayer, contrastRatio, createMap, createRouteEffect, defaultNavAlertsDesign, defaultNavDesign, defaultPoiDesign, directionArrow, effectsFromStyleMetadata, extractGuidance, flythrough, flythroughPose, formatCoord, formatCoords, hasBakedMarkers, haversineDistanceM, isMarkerGlyphId, isNameTextField, laneArrowDirection, languageTextField, lngLatToMercator, markerGlyphPaths, markerImage, markerImageDataKey, markerImageKey, markerText, markerTextImageKey, markersFromTheme, markersFromThemeUrl, navAlertLeadDistanceM, navAlertSoundUrl, navCameraKind, navDesignFromTheme, navDesignFromThemeUrl, parseCssColour, parseHexColor, parseMarkers, parseNavAlertsDesign, parseNavDesign, parseOsrmRoute, parsePoiDesign, placesFromGeoJSON, poiDesignFromTheme, poiDesignFromThemeUrl, poiDesignIsDefault, poiTextColorExpression, prefersReducedMotion, registerPmtilesProtocol, relativeLuminance, removeTerrain, renderMarkerImage, resetDiagnostics, resolveTerrain, resolveTheme, runMapDiagnostics, setMapLanguage, severityProsody, shortestArcDeg, shortestArcDelta, speak, ssmlToText, sunTimes, tessellateRouteRibbon, toLngLat, toPmtilesUrl, truncateChars, uploadProbeBatch };
|
|
5996
|
+
export { ALERT_CONTRAST_MIN, AdrCheck, BAKED_MARKERS_GLYPH_ID, CameraAlertChip, DEFAULT_GLYPHS_URL, DEFAULT_TERRAIN_ATTRIBUTION, DEFAULT_TERRAIN_URL, DEFAULT_TERRITORY_TILES_URL, EFFECTS_METADATA_KEY, FLOW_DEFAULTS, FULL_ATTRIBUTION, FlowRouteEffectLayer, Geocoder, GuidanceBanner, IsochroneLayer, LOGO_SVG, LogoControl, MARKERS_ID, MARKER_DEFAULT_COLOUR, MARKER_GLYPH_IDS, MARKER_GLYPH_VIEWBOX, MARKER_LABEL_TEXT_SIZES, MARKER_PIN_BODY_PATH, MARKER_SIZES, MARKER_SIZES_PX, MAX_MARKER_ID_LENGTH, MAX_MARKER_IMAGE_BYTES, MAX_MARKER_ITEMS, MAX_MARKER_LABEL_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_PUCK_IMAGE_BYTES, MapMapMap, MarkersLayer, NAV_ALERT_AUDIO_MODES, NAV_ALERT_CHIP_POSITIONS, NAV_ALERT_ICON_SETS, NAV_ALERT_LEAD_DISTANCES, NAV_ALERT_LEAD_DISTANCE_M, NAV_ALERT_MODES, NAV_ALERT_SOUNDS, NAV_ALERT_SOUND_BASE_URL, NAV_ALERT_SOUND_FILES, NAV_CAMERA_DEFAULTS, NAV_CAMERA_KINDS, NavigationCamera, OPENMAPTILES_ATTRIBUTION, OSM_ATTRIBUTION, PALETTE_SLOTS, POI_CATEGORY_COLORS, POI_CATEGORY_IDS, POI_CLASS_CATEGORIES, PlacesLayer, PositionPuck, RIBBON_FLOATS_PER_VERTEX, ROUTE_EFFECTS, RouteLayer, SIGNAL_BLUE, SOURCE_LAYERS, ThemeScheduler, VoiceGuidance, alertChipContent, alertContrastIssues, alertIconSvg, alertIconUrl, alertPresentation, alertSoundUrl, alertSpeedReadoutColor, applyPoiDesign, applyTerrain, bannerLanes, bearingBetween, bindFlythroughToScroll, buildAdrCheckBody, buildGeocodeUrl, buildProbeUrl, buildReverseGeocodeUrl, buildRouteQuery, buildRouteUrl, buildStyle, builtInPoiColor, cameraKindLabel, cameraKindsShownOnMap, cameraShownOnMap, cameraSpriteName, cameraSymbolLayer, contrastRatio, createMap, createRouteEffect, defaultNavAlertsDesign, defaultNavDesign, defaultPoiDesign, directionArrow, effectsFromStyleMetadata, extractGuidance, flythrough, flythroughPose, formatCoord, formatCoords, hasBakedMarkers, haversineDistanceM, isMarkerGlyphId, isNameTextField, laneArrowDirection, languageTextField, lngLatToMercator, markerGlyphPaths, markerImage, markerImageDataKey, markerImageKey, markerText, markerTextImageKey, markersFromTheme, markersFromThemeUrl, navAlertLeadDistanceM, navAlertSoundUrl, navCameraKind, navDesignFromTheme, navDesignFromThemeUrl, parseCssColour, parseGeocodeResponse, parseHexColor, parseMarkers, parseNavAlertsDesign, parseNavDesign, parseOsrmRoute, parsePoiDesign, placesFromGeoJSON, poiDesignFromTheme, poiDesignFromThemeUrl, poiDesignIsDefault, poiTextColorExpression, prefersReducedMotion, registerPmtilesProtocol, relativeLuminance, removeTerrain, renderMarkerImage, resetDiagnostics, resolveTerrain, resolveTheme, runMapDiagnostics, setMapLanguage, severityProsody, shortestArcDeg, shortestArcDelta, speak, ssmlToText, sunTimes, tessellateRouteRibbon, toLngLat, toPmtilesUrl, truncateChars, uploadProbeBatch };
|
|
5861
5997
|
//# sourceMappingURL=index.js.map
|
|
5862
5998
|
//# sourceMappingURL=index.js.map
|