@wemap/routing 14.0.0-0

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 ADDED
@@ -0,0 +1,47 @@
1
+ # Routing Package
2
+
3
+ The routing package provides route calculation and navigation capabilities.
4
+
5
+ ## Features
6
+
7
+ - **Route Calculation**: Calculate routes between two points using various travel modes
8
+ - **Multiple Itineraries**: Get multiple route options sorted by preference
9
+ - **Travel Modes**: Support for walking, driving, transit, and more
10
+ - **PMR Support**: Options to avoid stairs and escalators for accessibility
11
+
12
+ ## Getting Started
13
+
14
+ ```typescript
15
+ import { Router } from '@wemap/routing';
16
+ import { core } from '@wemap/core';
17
+
18
+ // Initialize core SDK first
19
+ await core.init({ emmid: '...', token: '...' });
20
+
21
+ // Create router and calculate route
22
+ const router = new Router();
23
+ const itineraries = await router.directions(
24
+ { lat: 48.8566, lon: 2.3522 },
25
+ { lat: 48.8606, lon: 2.3376 },
26
+ 'WALK',
27
+ { pmr: true }
28
+ );
29
+
30
+ // Use the first (usually best) itinerary
31
+ const bestRoute = itineraries[0];
32
+ console.log(`Distance: ${bestRoute.distance}m`);
33
+ console.log(`Duration: ${bestRoute.duration}s`);
34
+ ```
35
+
36
+ ## Travel Modes
37
+
38
+ - `WALK`: Pedestrian routes
39
+ - `CAR`: Vehicle routes
40
+ - `TRANSIT`: Public transportation routes
41
+ - And more...
42
+
43
+ ## Route Options
44
+
45
+ - `pmr`: Avoid stairs and escalators (Person with Reduced Mobility)
46
+ - `departureDate`: Specify departure time for transit routes
47
+
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @category Routing
3
+ *
4
+ * Routing package - Route calculation and navigation functionality
5
+ *
6
+ * Provides routing capabilities including route calculation, itinerary management,
7
+ * and navigation utilities for working with routes and current position.
8
+ */
9
+ export { Itinerary, Leg, ItineraryInfoManager, } from '@wemap/routers-legacy';
10
+ export type { ItineraryInfo, Step, TravelMode, } from '@wemap/routers-legacy';
11
+ export { Coordinates, UserPosition } from '@wemap/geo-legacy';
12
+ export { Router } from './src/Router';
13
+ export type { RouteOptions } from './src/types';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,SAAS,EACT,GAAG,EACH,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,aAAa,EACb,IAAI,EACJ,UAAU,GACX,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}