@stadiamaps/ferrostar-webcomponents 0.28.0 → 0.30.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.
@@ -15,9 +15,19 @@ export declare class FerrostarMap extends LitElement {
15
15
  locationProvider: any;
16
16
  options: object;
17
17
  protected _tripState: TripState | null;
18
+ /**
19
+ * Configures the map on first load.
20
+ *
21
+ * Note: This will only be invoked if there is no map set
22
+ * by the time of the first component update.
23
+ * If you provide your own map parameter,
24
+ * configuration is left to the caller.
25
+ * Be sure to set the DOM parent via the slot as well.
26
+ */
18
27
  configureMap?: (map: Map) => void;
19
28
  onNavigationStart?: (map: Map) => void;
20
29
  onNavigationStop?: (map: Map) => void;
30
+ onTripStateChange?: (newState: TripState | null) => void;
21
31
  /**
22
32
  * Styles to load which will apply inside the component
23
33
  * (ex: for MapLibre plugins)
@@ -34,6 +44,17 @@ export declare class FerrostarMap extends LitElement {
34
44
  */
35
45
  geolocateOnLoad: boolean;
36
46
  routeAdapter: RouteAdapter | null;
47
+ /**
48
+ * The MapLibre map instance.
49
+ *
50
+ * This will be automatically initialized by default
51
+ * when the web component does its first update cycle.
52
+ * However, you can also explicitly set this value
53
+ * when initializing the web component to provide your own map instance.
54
+ *
55
+ * Note: If you set this property, you MUST also pass the map's container attribute
56
+ * via the slot!
57
+ */
37
58
  map: maplibregl.Map | null;
38
59
  geolocateControl: GeolocateControl | null;
39
60
  navigationController: NavigationController | null;
@@ -43,9 +64,17 @@ export declare class FerrostarMap extends LitElement {
43
64
  constructor();
44
65
  updated(changedProperties: PropertyValues<this>): void;
45
66
  firstUpdated(): void;
67
+ /**
68
+ * Initialize the MapLibre Map control.
69
+ *
70
+ * This is run by default on firstUpdated,
71
+ * but is skipped if the user adds a map of their own.
72
+ */
73
+ initMap(): void;
46
74
  getRoutes(initialLocation: any, waypoints: any): Promise<any>;
47
75
  startNavigation(route: any, config: any): void;
48
76
  stopNavigation(): Promise<void>;
77
+ private tripStateUpdate;
49
78
  private onLocationUpdated;
50
79
  private clearMap;
51
80
  render(): import('lit-html').TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"ferrostar-map.d.ts","sourceRoot":"","sources":["../src/ferrostar-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAEvE,OAAO,UAAU,EAAE,EACjB,gBAAgB,EAEhB,UAAU,EACV,GAAG,EACJ,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sBAAsB,CAAC;AAI9B;;GAEG;AACH,qBACa,YAAa,SAAQ,UAAU;IAE1C,mBAAmB,EAAE,MAAM,CAAM;IAGjC,QAAQ,EAAE,MAAM,CAAM;IAGtB,OAAO,EAAE,MAAM,CAAM;IAGrB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;IAGjC,KAAK,EAAE,MAAM,CAAM;IAGnB,IAAI,EAAE,MAAM,CAAK;IAGjB,UAAU,CAAC,EAAE,QAAQ,CAAS;IAI9B,gBAAgB,EAAG,GAAG,CAAC;IAIvB,OAAO,EAAE,MAAM,CAAM;IAGrB,SAAS,CAAC,UAAU,EAAE,SAAS,GAAG,IAAI,CAAQ;IAI9C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGlC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAGvC,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAEtC;;;OAGG;IAEH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IAEH,gBAAgB,EAAE,OAAO,CAAS;IAElC;;;OAGG;IAEH,eAAe,EAAE,OAAO,CAAQ;IAEhC,YAAY,EAA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