@tomtom-org/maps-sdk 0.36.0 → 0.36.2
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/CHANGELOG.md +15 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +18 -3
- package/map/dist/THIRD_PARTY.txt +1 -1
- package/map/dist/index.d.ts +36 -11
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/package.json +1 -1
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/core/dist/index.d.ts
CHANGED
|
@@ -2165,7 +2165,7 @@ export declare type GetPositionOptions = {
|
|
|
2165
2165
|
* }
|
|
2166
2166
|
* ```
|
|
2167
2167
|
*
|
|
2168
|
-
* @
|
|
2168
|
+
* @ignore
|
|
2169
2169
|
*/
|
|
2170
2170
|
export declare const getPositionStrict: (hasLngLat: HasLngLat, options?: GetPositionOptions) => Position;
|
|
2171
2171
|
|
|
@@ -3432,6 +3432,15 @@ export declare type POI = {
|
|
|
3432
3432
|
timeZone?: TimeZone;
|
|
3433
3433
|
};
|
|
3434
3434
|
|
|
3435
|
+
/**
|
|
3436
|
+
* POI categories were retrieved from https://docs.tomtom.com/search-api/documentation/poi-categories-service/poi-categories
|
|
3437
|
+
* so it can be passed to search endpoints in a human-readable format in addition to being able to use POI category ID directly
|
|
3438
|
+
* categories were put in this format trying to match them poi classification codes as much as possible.
|
|
3439
|
+
*
|
|
3440
|
+
* @ignore
|
|
3441
|
+
*/
|
|
3442
|
+
export declare const poiCategoriesToID: Record<POICategory, number>;
|
|
3443
|
+
|
|
3435
3444
|
/**
|
|
3436
3445
|
* @group Place
|
|
3437
3446
|
*/
|
|
@@ -3470,6 +3479,13 @@ export declare type PoiDetailsDataSource = {
|
|
|
3470
3479
|
sourceName?: string;
|
|
3471
3480
|
};
|
|
3472
3481
|
|
|
3482
|
+
/**
|
|
3483
|
+
* Inverted mapping of POI category IDs to their corresponding category names.
|
|
3484
|
+
*
|
|
3485
|
+
* @ignore
|
|
3486
|
+
*/
|
|
3487
|
+
export declare const poiIDsToCategories: Record<number, POICategory>;
|
|
3488
|
+
|
|
3473
3489
|
/**
|
|
3474
3490
|
* GeoJSON Feature containing polygon or multi-polygon geometry.
|
|
3475
3491
|
*
|
|
@@ -4447,9 +4463,8 @@ export declare type TomTomHeaders = {
|
|
|
4447
4463
|
|
|
4448
4464
|
/**
|
|
4449
4465
|
* @ignore
|
|
4450
|
-
* @param lngLat
|
|
4451
4466
|
*/
|
|
4452
|
-
export declare const toPointFeature: (
|
|
4467
|
+
export declare const toPointFeature: (coordinates: Position) => Feature<Point>;
|
|
4453
4468
|
|
|
4454
4469
|
/**
|
|
4455
4470
|
* All possible traffic incident categories.
|
package/map/dist/THIRD_PARTY.txt
CHANGED
package/map/dist/index.d.ts
CHANGED
|
@@ -3504,9 +3504,10 @@ export declare type LightDark = 'light' | 'dark';
|
|
|
3504
3504
|
export declare const MAJOR_DELAY_COLOR = "#AD0000";
|
|
3505
3505
|
|
|
3506
3506
|
/**
|
|
3507
|
+
* POI category mappings that have a direct equivalent in Map Display POI categories.
|
|
3507
3508
|
* @ignore
|
|
3508
3509
|
*/
|
|
3509
|
-
declare const mapDisplayPoiCategoryMappings: Partial<Record<POICategory, string>>;
|
|
3510
|
+
export declare const mapDisplayPoiCategoryMappings: Partial<Record<POICategory, string>>;
|
|
3510
3511
|
|
|
3511
3512
|
/**
|
|
3512
3513
|
* Configuration options for map user event handling.
|
|
@@ -4171,15 +4172,39 @@ export declare type PlaceIconConfig = {
|
|
|
4171
4172
|
*/
|
|
4172
4173
|
categoryIcons?: CustomImage<MapStylePOICategory>[];
|
|
4173
4174
|
/**
|
|
4174
|
-
* Custom mapping
|
|
4175
|
+
* Custom mapping to determine the icon for a given place.
|
|
4175
4176
|
*
|
|
4176
4177
|
* @remarks
|
|
4177
|
-
*
|
|
4178
|
-
* This allows for full control on how to determine which icon to use for each place based on its properties.
|
|
4178
|
+
* Supports two mapping strategies:
|
|
4179
4179
|
*
|
|
4180
|
-
*
|
|
4180
|
+
* - **`imageID`**: Directly returns the icon image ID to use for the place.
|
|
4181
|
+
* This provides full control over icon selection.
|
|
4182
|
+
*
|
|
4183
|
+
* - **`poiCategory`**: Returns a POI category, which is then resolved to an icon
|
|
4184
|
+
* using the existing category-to-icon logic. This reuses the standard category mapping.
|
|
4185
|
+
*
|
|
4186
|
+
* @example
|
|
4187
|
+
* ```typescript
|
|
4188
|
+
* // Direct image ID mapping
|
|
4189
|
+
* mapping: {
|
|
4190
|
+
* to: 'imageID',
|
|
4191
|
+
* fn: (place) => place.properties.poi?.name?.includes('urgent') ? 'urgent-icon' : 'default-icon'
|
|
4192
|
+
* }
|
|
4193
|
+
*
|
|
4194
|
+
* // POI category mapping
|
|
4195
|
+
* mapping: {
|
|
4196
|
+
* to: 'poiCategory',
|
|
4197
|
+
* fn: (place) => place.properties.customCategory || 'RESTAURANT'
|
|
4198
|
+
* }
|
|
4199
|
+
* ```
|
|
4181
4200
|
*/
|
|
4182
|
-
mapping?:
|
|
4201
|
+
mapping?: {
|
|
4202
|
+
to: 'imageID';
|
|
4203
|
+
fn: (place: Place) => string;
|
|
4204
|
+
} | {
|
|
4205
|
+
to: 'poiCategory';
|
|
4206
|
+
fn: (place: Place) => MapStylePOICategory;
|
|
4207
|
+
};
|
|
4183
4208
|
};
|
|
4184
4209
|
|
|
4185
4210
|
/**
|
|
@@ -6855,6 +6880,11 @@ export declare const tertiaryRoadCategories: readonly ["connecting", "major_loca
|
|
|
6855
6880
|
*/
|
|
6856
6881
|
export declare type TertiaryRoadCategory = (typeof tertiaryRoadCategories)[number];
|
|
6857
6882
|
|
|
6883
|
+
/**
|
|
6884
|
+
* @ignore
|
|
6885
|
+
*/
|
|
6886
|
+
export declare const toBaseMapPOICategory: (category: POICategory) => string;
|
|
6887
|
+
|
|
6858
6888
|
/**
|
|
6859
6889
|
* Layer to be added to the existing style, and may include extra config such as the ID of the layer to add it under.
|
|
6860
6890
|
* * e.g. GeoJSON layers.
|
|
@@ -6887,11 +6917,6 @@ export declare type ToBeAddedLayerSpecTemplate<L extends LayerSpecification = La
|
|
|
6887
6917
|
*/
|
|
6888
6918
|
export declare type ToBeAddedLayerSpecWithoutSource<L extends LayerSpecification = LayerSpecification> = Omit<ToBeAddedLayerSpec<L>, 'source'>;
|
|
6889
6919
|
|
|
6890
|
-
/**
|
|
6891
|
-
* @ignore
|
|
6892
|
-
*/
|
|
6893
|
-
export declare const toMapDisplayPOICategory: (category: POICategory) => string;
|
|
6894
|
-
|
|
6895
6920
|
/**
|
|
6896
6921
|
* Main TomTom Map class for displaying interactive maps in web applications.
|
|
6897
6922
|
*
|