@tomtom-org/maps-sdk 0.45.4 → 0.45.5
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 +12 -0
- package/core/dist/core.es.js +1 -1
- package/core/dist/core.es.js.map +1 -1
- package/core/dist/index.d.ts +361 -32
- package/core/package.json +1 -0
- package/map/dist/THIRD_PARTY.txt +1 -107
- package/map/dist/index.d.ts +191 -3
- package/map/dist/map.es.js +1 -1
- package/map/dist/map.es.js.map +1 -1
- package/map/package.json +3 -2
- package/package.json +3 -2
- package/services/dist/index.d.ts +3 -3
- package/services/dist/services.es.js +1 -1
- package/services/dist/services.es.js.map +1 -1
package/map/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { ExpressionFilterSpecification } from 'maplibre-gl';
|
|
|
14
14
|
import { ExpressionSpecification } from 'maplibre-gl';
|
|
15
15
|
import { Feature } from 'geojson';
|
|
16
16
|
import { FeatureCollection } from 'geojson';
|
|
17
|
+
import { GeoJsonProperties } from 'geojson';
|
|
17
18
|
import { GeoJSONSource } from 'maplibre-gl';
|
|
18
19
|
import { GeoJSONSourceSpecification } from 'maplibre-gl';
|
|
19
20
|
import { GetPositionEntryPointOption } from '@tomtom-org/maps-sdk/core';
|
|
@@ -2983,6 +2984,24 @@ export declare class GeometriesModule extends AbstractMapModule<GeometrySourcesW
|
|
|
2983
2984
|
* ```
|
|
2984
2985
|
*/
|
|
2985
2986
|
clear(): Promise<void>;
|
|
2987
|
+
/**
|
|
2988
|
+
* Returns the currently shown geometries.
|
|
2989
|
+
*
|
|
2990
|
+
* @returns The geometries currently displayed on the map.
|
|
2991
|
+
*
|
|
2992
|
+
* @remarks
|
|
2993
|
+
* Returns the exact data that was passed to the `show()` method.
|
|
2994
|
+
*
|
|
2995
|
+
* @example
|
|
2996
|
+
* ```typescript
|
|
2997
|
+
* const shown = geometriesModule.getShown();
|
|
2998
|
+
* console.log(`Geometries: ${shown.geometry.features.length}`);
|
|
2999
|
+
* ```
|
|
3000
|
+
*/
|
|
3001
|
+
getShown(): {
|
|
3002
|
+
geometry: PolygonFeatures;
|
|
3003
|
+
geometryLabel: FeatureCollection<Point, GeoJsonProperties>;
|
|
3004
|
+
};
|
|
2986
3005
|
/**
|
|
2987
3006
|
* Gets the events interface for handling user interactions with geometries.
|
|
2988
3007
|
*
|
|
@@ -3611,8 +3630,11 @@ declare type HillshadeSourcesWithLayers = {
|
|
|
3611
3630
|
* Subtype for hover events with timing distinction.
|
|
3612
3631
|
*
|
|
3613
3632
|
* @remarks
|
|
3614
|
-
* - `hover`:
|
|
3615
|
-
* - `
|
|
3633
|
+
* - `hover`: Fires once when the cursor first enters a feature
|
|
3634
|
+
* - `hover-move`: Fires on every mouse movement while the cursor remains over the same feature.
|
|
3635
|
+
* Use this when you need continuously updated coordinates as the cursor travels along the feature
|
|
3636
|
+
* (e.g. updating a tooltip position or snapping to a route line).
|
|
3637
|
+
* - `long-hover`: Triggered after hovering over a feature for a configured duration (typically 300-800ms)
|
|
3616
3638
|
*
|
|
3617
3639
|
* Long-hover is useful for showing detailed tooltips or previews without
|
|
3618
3640
|
* cluttering the UI during quick mouse movements.
|
|
@@ -3620,12 +3642,13 @@ declare type HillshadeSourcesWithLayers = {
|
|
|
3620
3642
|
* @example
|
|
3621
3643
|
* ```typescript
|
|
3622
3644
|
* const quickHover: HoverEventType = 'hover';
|
|
3645
|
+
* const movingHover: HoverEventType = 'hover-move';
|
|
3623
3646
|
* const sustainedHover: HoverEventType = 'long-hover';
|
|
3624
3647
|
* ```
|
|
3625
3648
|
*
|
|
3626
3649
|
* @group User Interaction Events
|
|
3627
3650
|
*/
|
|
3628
|
-
export declare type HoverEventType = 'hover' | 'long-hover';
|
|
3651
|
+
export declare type HoverEventType = 'hover' | 'hover-move' | 'long-hover';
|
|
3629
3652
|
|
|
3630
3653
|
/**
|
|
3631
3654
|
* Available traffic incident category identifiers.
|
|
@@ -4786,6 +4809,23 @@ export declare class PlacesModule extends AbstractMapModule<PlacesSourcesAndLaye
|
|
|
4786
4809
|
* ```
|
|
4787
4810
|
*/
|
|
4788
4811
|
clear(): Promise<void>;
|
|
4812
|
+
/**
|
|
4813
|
+
* Returns the currently shown places.
|
|
4814
|
+
*
|
|
4815
|
+
* @returns The places currently displayed on the map.
|
|
4816
|
+
*
|
|
4817
|
+
* @remarks
|
|
4818
|
+
* Returns the exact data that was passed to the `show()` method.
|
|
4819
|
+
*
|
|
4820
|
+
* @example
|
|
4821
|
+
* ```typescript
|
|
4822
|
+
* const shown = placesModule.getShown();
|
|
4823
|
+
* console.log(`Showing ${shown.places.features.length} places`);
|
|
4824
|
+
* ```
|
|
4825
|
+
*/
|
|
4826
|
+
getShown(): {
|
|
4827
|
+
places: Places<DisplayPlaceProps>;
|
|
4828
|
+
};
|
|
4789
4829
|
/**
|
|
4790
4830
|
* Programmatically sets an event state on a specific place.
|
|
4791
4831
|
*
|
|
@@ -5489,6 +5529,23 @@ export declare class POIsModule extends AbstractMapModule<PoIsSourcesAndLayers,
|
|
|
5489
5529
|
* ```
|
|
5490
5530
|
*/
|
|
5491
5531
|
filterCategories(categoriesFilter?: ValuesFilter<FilterablePOICategory> | undefined): void;
|
|
5532
|
+
/**
|
|
5533
|
+
* Returns features currently visible in the viewport.
|
|
5534
|
+
*
|
|
5535
|
+
* @returns An object containing visible POI features with properly typed properties.
|
|
5536
|
+
*
|
|
5537
|
+
* @example
|
|
5538
|
+
* ```typescript
|
|
5539
|
+
* const shown = poisModule.getShown();
|
|
5540
|
+
* console.log(`Visible POIs: ${shown.poi.length}`);
|
|
5541
|
+
* shown.poi.forEach(poi => {
|
|
5542
|
+
* console.log(poi.properties.name, poi.properties.category);
|
|
5543
|
+
* });
|
|
5544
|
+
* ```
|
|
5545
|
+
*/
|
|
5546
|
+
getShown(): {
|
|
5547
|
+
poi: POIsModuleFeature[];
|
|
5548
|
+
};
|
|
5492
5549
|
/**
|
|
5493
5550
|
* Gets the events interface for handling user interactions with POIs.
|
|
5494
5551
|
*
|
|
@@ -6497,6 +6554,59 @@ export declare class RoutingModule extends AbstractMapModule<RoutingSourcesWithL
|
|
|
6497
6554
|
* * If nothing was shown before, nothing happens.
|
|
6498
6555
|
*/
|
|
6499
6556
|
clearWaypoints(): Promise<void>;
|
|
6557
|
+
/**
|
|
6558
|
+
* Returns the currently shown routes and waypoints.
|
|
6559
|
+
*
|
|
6560
|
+
* @returns An object containing all currently displayed routing data.
|
|
6561
|
+
*
|
|
6562
|
+
* @remarks
|
|
6563
|
+
* Returns the exact data that was passed to the `showRoutes()` and `showWaypoints()` methods.
|
|
6564
|
+
*
|
|
6565
|
+
* **Returned Data:**
|
|
6566
|
+
* - `mainLines`: Main route lines (selected and alternative)
|
|
6567
|
+
* - `waypoints`: Route waypoints (start, stops, finish)
|
|
6568
|
+
* - `incidents`: Traffic incidents on routes
|
|
6569
|
+
* - `ferries`: Ferry sections
|
|
6570
|
+
* - `chargingStops`: EV charging stations
|
|
6571
|
+
* - `tollRoads`: Toll road sections
|
|
6572
|
+
* - `tunnels`: Tunnel sections
|
|
6573
|
+
* - `vehicleRestricted`: Vehicle-restricted sections
|
|
6574
|
+
* - `instructionLines`: Turn-by-turn instruction lines
|
|
6575
|
+
* - `instructionArrows`: Instruction arrow markers
|
|
6576
|
+
* - `summaryBubbles`: Route summary popups
|
|
6577
|
+
*
|
|
6578
|
+
* @example
|
|
6579
|
+
* ```typescript
|
|
6580
|
+
* const shown = routingModule.getShown();
|
|
6581
|
+
* console.log(`Showing ${shown.mainLines.features.length} routes`);
|
|
6582
|
+
* console.log(`Showing ${shown.waypoints.features.length} waypoints`);
|
|
6583
|
+
* console.log(`Showing ${shown.chargingStops.features.length} charging stops`);
|
|
6584
|
+
* ```
|
|
6585
|
+
*
|
|
6586
|
+
* @example
|
|
6587
|
+
* Check if any routes are displayed:
|
|
6588
|
+
* ```typescript
|
|
6589
|
+
* const shown = routingModule.getShown();
|
|
6590
|
+
* if (shown.mainLines.features.length > 0) {
|
|
6591
|
+
* console.log('Routes are displayed');
|
|
6592
|
+
* } else {
|
|
6593
|
+
* console.log('No routes displayed');
|
|
6594
|
+
* }
|
|
6595
|
+
* ```
|
|
6596
|
+
*/
|
|
6597
|
+
getShown(): {
|
|
6598
|
+
mainLines: Routes_2<DisplayRouteProps>;
|
|
6599
|
+
waypoints: Waypoints_2<WaypointDisplayProps>;
|
|
6600
|
+
incidents: RouteSections<DisplayTrafficSectionProps>;
|
|
6601
|
+
ferries: RouteSections;
|
|
6602
|
+
chargingStops: Waypoints_2;
|
|
6603
|
+
tollRoads: RouteSections;
|
|
6604
|
+
tunnels: RouteSections;
|
|
6605
|
+
vehicleRestricted: RouteSections;
|
|
6606
|
+
instructionLines: DisplayInstructions;
|
|
6607
|
+
instructionArrows: DisplayInstructionArrows;
|
|
6608
|
+
summaryBubbles: DisplayRouteSummaries;
|
|
6609
|
+
};
|
|
6500
6610
|
/**
|
|
6501
6611
|
* Create the events on/off for this module
|
|
6502
6612
|
* @returns An instance of EventsModule
|
|
@@ -8171,6 +8281,45 @@ export declare class TrafficFlowModule extends AbstractMapModule<TrafficFlowSour
|
|
|
8171
8281
|
* Returns if any layer for traffic flow is visible or not.
|
|
8172
8282
|
*/
|
|
8173
8283
|
isVisible(): boolean;
|
|
8284
|
+
/**
|
|
8285
|
+
* Returns features currently visible in the viewport.
|
|
8286
|
+
*
|
|
8287
|
+
* @returns An object containing visible traffic flow features.
|
|
8288
|
+
*
|
|
8289
|
+
* @remarks
|
|
8290
|
+
* Returns all traffic flow features currently rendered in the visible map area.
|
|
8291
|
+
* These represent road segments with real-time traffic speed information.
|
|
8292
|
+
*
|
|
8293
|
+
* **Feature Properties:**
|
|
8294
|
+
* Properties depend on the traffic flow vector tile schema and may include:
|
|
8295
|
+
* - Current speed
|
|
8296
|
+
* - Free flow speed
|
|
8297
|
+
* - Road category
|
|
8298
|
+
* - Congestion level
|
|
8299
|
+
* - Road closure status
|
|
8300
|
+
*
|
|
8301
|
+
* @example
|
|
8302
|
+
* ```typescript
|
|
8303
|
+
* const shown = trafficFlow.getShown();
|
|
8304
|
+
* console.log(`Visible flow segments: ${shown.trafficFlow.length}`);
|
|
8305
|
+
* shown.trafficFlow.forEach(segment => {
|
|
8306
|
+
* console.log('Road segment:', segment.properties);
|
|
8307
|
+
* });
|
|
8308
|
+
* ```
|
|
8309
|
+
*
|
|
8310
|
+
* @example
|
|
8311
|
+
* Analyze congestion in viewport:
|
|
8312
|
+
* ```typescript
|
|
8313
|
+
* const shown = trafficFlow.getShown();
|
|
8314
|
+
* const congested = shown.trafficFlow.filter(
|
|
8315
|
+
* segment => segment.properties.speed < segment.properties.freeFlowSpeed * 0.5
|
|
8316
|
+
* );
|
|
8317
|
+
* console.log(`Congested segments: ${congested.length}`);
|
|
8318
|
+
* ```
|
|
8319
|
+
*/
|
|
8320
|
+
getShown(): {
|
|
8321
|
+
trafficFlow: MapGeoJSONFeature[];
|
|
8322
|
+
};
|
|
8174
8323
|
/**
|
|
8175
8324
|
* Create the events on/off for this module
|
|
8176
8325
|
* @returns An instance of EventsModule
|
|
@@ -8583,6 +8732,45 @@ export declare class TrafficIncidentsModule extends AbstractMapModule<TrafficInc
|
|
|
8583
8732
|
* ```
|
|
8584
8733
|
*/
|
|
8585
8734
|
anyIconLayersVisible(): boolean;
|
|
8735
|
+
/**
|
|
8736
|
+
* Returns features currently visible in the viewport.
|
|
8737
|
+
*
|
|
8738
|
+
* @returns An object containing visible traffic incident features.
|
|
8739
|
+
*
|
|
8740
|
+
* @remarks
|
|
8741
|
+
* Returns all incident features currently rendered in the visible map area,
|
|
8742
|
+
* including both incident areas/lines and icon markers.
|
|
8743
|
+
*
|
|
8744
|
+
* **Feature Properties:**
|
|
8745
|
+
* Properties depend on the traffic incidents vector tile schema and may include:
|
|
8746
|
+
* - Incident type/category
|
|
8747
|
+
* - Severity/magnitude
|
|
8748
|
+
* - Delay information
|
|
8749
|
+
* - Road affected
|
|
8750
|
+
* - Description
|
|
8751
|
+
*
|
|
8752
|
+
* @example
|
|
8753
|
+
* ```typescript
|
|
8754
|
+
* const shown = incidents.getShown();
|
|
8755
|
+
* console.log(`Visible incidents: ${shown.trafficIncidents.length}`);
|
|
8756
|
+
* shown.trafficIncidents.forEach(incident => {
|
|
8757
|
+
* console.log('Incident:', incident.properties);
|
|
8758
|
+
* });
|
|
8759
|
+
* ```
|
|
8760
|
+
*
|
|
8761
|
+
* @example
|
|
8762
|
+
* Filter and analyze visible incidents:
|
|
8763
|
+
* ```typescript
|
|
8764
|
+
* const shown = incidents.getShown();
|
|
8765
|
+
* const accidents = shown.trafficIncidents.filter(
|
|
8766
|
+
* incident => incident.properties.category === 'accident'
|
|
8767
|
+
* );
|
|
8768
|
+
* console.log(`Accidents in view: ${accidents.length}`);
|
|
8769
|
+
* ```
|
|
8770
|
+
*/
|
|
8771
|
+
getShown(): {
|
|
8772
|
+
trafficIncidents: MapGeoJSONFeature[];
|
|
8773
|
+
};
|
|
8586
8774
|
/**
|
|
8587
8775
|
* Create the events on/off for this module
|
|
8588
8776
|
* @returns An instance of EventsModule
|