becomap 1.7.0 → 1.7.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/lib/index.d.ts CHANGED
@@ -611,8 +611,12 @@ export interface BCRouteController {
611
611
  *
612
612
  * @param segment - The BCRouteSegment object representing the route to be walked through.
613
613
  * This object contains the sequence of steps that define the route.
614
+ * @param options - Optional configuration for the walkthrough animation
615
+ * @param options.cameraZoom - Optional zoom level for the camera during step animations (default: auto-calculated by fitBounds)
614
616
  */
615
- walkThrough(segment: BCRouteSegment): void;
617
+ walkThrough(segment: BCRouteSegment, options?: {
618
+ cameraZoom?: number;
619
+ }): void;
616
620
  /**
617
621
  * Stops the ongoing walkthrough of the route segment.
618
622
  */
@@ -629,12 +633,18 @@ export interface BCRouteController {
629
633
  * contains information about the node, the action to be taken, the direction,
630
634
  * and other relevant details that can be used to visually represent the step
631
635
  * on the map.
636
+ * @param options - Optional configuration for the step display
637
+ * @param options.cameraZoom - Optional zoom level for the camera (default: auto-calculated by fitBounds)
638
+ * @param options.bufferDistance - Optional buffer distance in meters to expand the view area (default: 5)
632
639
  *
633
640
  * @example
634
641
  * const routeStep: BCRouteStep = /obtain the step from a route segment/;
635
642
  * this.showStep(routeStep);
636
643
  */
637
- showStep(step: BCRouteStep): void;
644
+ showStep(step: BCRouteStep, options?: {
645
+ cameraZoom?: number;
646
+ bufferDistance?: number;
647
+ }): void;
638
648
  /**
639
649
  * Shows the route step by its orderIndex.
640
650
  * @param orderIndex - The order index of the step to display.
@@ -673,6 +683,7 @@ export interface BCRouteController {
673
683
  * @param options.customFloorNotification - Custom function to render floor change notification (receives floor and returns HTMLElement)
674
684
  * @param options.onComplete - Callback function called when animation completes
675
685
  * @param options.onFloorChange - Callback function called when marker changes floor
686
+ * @param options.startImmediately - If true, starts animation immediately without waiting for route/arrow animations (default: false)
676
687
  *
677
688
  * @example
678
689
  * // Animate with default settings (camera follows marker)
@@ -709,6 +720,7 @@ export interface BCRouteController {
709
720
  customFloorNotification?: (floor: BCMapFloor) => HTMLElement;
710
721
  onComplete?: () => void;
711
722
  onFloorChange?: (floor: BCMapFloor) => void;
723
+ startImmediately?: boolean;
712
724
  }): void;
713
725
  /**
714
726
  * Stops the ongoing marker animation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "becomap",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "we lib to display becomap",
5
5
  "main": "lib/becomap.js",
6
6
  "module": "lib/becomap.js",