becomap 1.6.96 → 1.6.98

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
@@ -599,8 +599,9 @@ export interface BCRouteController {
599
599
  *
600
600
  * @param segments - A single BCRouteSegment or an array of BCRouteSegment objects to display on the map.
601
601
  * @param onFLoor - BCMapFloor object that defines which floor route should show. if null shows starting floor.
602
+ * @param useAnimatedArrows - If true, shows animated arrows; if false, shows static arrows (default: true)
602
603
  */
603
- showRoute(segments: BCRouteSegment | BCRouteSegment[], onFLoor: BCMapFloor | null): void;
604
+ showRoute(segments: BCRouteSegment | BCRouteSegment[], onFLoor: BCMapFloor | null, useAnimatedArrows?: boolean): void;
604
605
  /**
605
606
  * Initiates a walkthrough of the given route segment, animating through each step of the route.
606
607
  *
@@ -669,6 +670,7 @@ export interface BCRouteController {
669
670
  * @param options.followCamera - Whether the map camera should follow the marker (default: true)
670
671
  * @param options.cameraZoom - Optional zoom level for the camera when following (default: current zoom)
671
672
  * @param options.showFloorChangeNotification - Whether to show visual notification on floor change (default: true)
673
+ * @param options.customFloorNotification - Custom function to render floor change notification (receives floor and returns HTMLElement)
672
674
  * @param options.onComplete - Callback function called when animation completes
673
675
  * @param options.onFloorChange - Callback function called when marker changes floor
674
676
  *
@@ -686,6 +688,17 @@ export interface BCRouteController {
686
688
  * onComplete: () => console.log('Animation finished!'),
687
689
  * onFloorChange: (floor) => console.log('Changed to floor:', floor.name)
688
690
  * });
691
+ *
692
+ * @example
693
+ * // Animate with custom floor notification
694
+ * routeController.animateMarkerAlongRoute({
695
+ * customFloorNotification: (floor) => {
696
+ * const div = document.createElement('div');
697
+ * div.innerHTML = `<h1>Going to ${floor.name}</h1>`;
698
+ * div.style.cssText = 'position: fixed; top: 20px; right: 20px; background: blue; color: white; padding: 20px;';
699
+ * return div;
700
+ * }
701
+ * });
689
702
  */
690
703
  animateMarkerAlongRoute(options?: {
691
704
  duration?: number;
@@ -693,6 +706,7 @@ export interface BCRouteController {
693
706
  followCamera?: boolean;
694
707
  cameraZoom?: number;
695
708
  showFloorChangeNotification?: boolean;
709
+ customFloorNotification?: (floor: BCMapFloor) => HTMLElement;
696
710
  onComplete?: () => void;
697
711
  onFloorChange?: (floor: BCMapFloor) => void;
698
712
  }): void;
@@ -700,6 +714,26 @@ export interface BCRouteController {
700
714
  * Stops the ongoing marker animation.
701
715
  */
702
716
  stopMarkerAnimation(): void;
717
+ /**
718
+ * Animates arrows moving along the route path using GeoJSON source.
719
+ * Creates multiple arrow symbols that physically move along the route line.
720
+ *
721
+ * @param options - Optional configuration for the arrow animation
722
+ * @param options.duration - Duration for arrows to complete the full route in milliseconds (default: 3000)
723
+ * @param options.arrowCount - Number of arrows moving along the route (if not provided, calculated dynamically based on distance)
724
+ * @param options.arrowSpacing - Distance between arrows in meters (default: 30m, used when arrowCount is not provided)
725
+ * @param options.floorId - Optional floor ID to filter arrows to specific floor only
726
+ */
727
+ startArrowAnimation(options?: {
728
+ duration?: number;
729
+ arrowCount?: number;
730
+ arrowSpacing?: number;
731
+ floorId?: string;
732
+ }): void;
733
+ /**
734
+ * Stops the arrow animation and removes the animated arrows.
735
+ */
736
+ stopArrowAnimation(): void;
703
737
  }
704
738
  export type BCRoutable = BCLocation;
705
739
  export interface BCRouteOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "becomap",
3
- "version": "1.6.96",
3
+ "version": "1.6.98",
4
4
  "description": "we lib to display becomap",
5
5
  "main": "lib/becomap.js",
6
6
  "module": "lib/becomap.js",