@milemaker/milemaker-js 1.1.0-alpha.1 → 2.0.0-alpha.1

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.
Files changed (54) hide show
  1. package/dist/actions/constants/actions.constants.d.ts +3 -2
  2. package/dist/actions/index.d.ts +4 -1
  3. package/dist/actions/layer/baseLayerActions.factory.d.ts +1 -1
  4. package/dist/actions/layer/index.d.ts +5 -2
  5. package/dist/actions/layer/types/layerActions.types.d.ts +34 -10
  6. package/dist/actions/layer/weatherLayerActions.factory.d.ts +8 -0
  7. package/dist/actions/marker/types/markerActions.types.d.ts +1 -1
  8. package/dist/actions/popup/types/popupActions.types.d.ts +1 -1
  9. package/dist/components/Popper/Popper.d.ts +1 -1
  10. package/dist/components/Popper/Popper.types.d.ts +3 -0
  11. package/dist/components/WeatherLegend/RainSnowIceLegend/RainSnowIceLegend.d.ts +3 -0
  12. package/dist/components/WeatherLegend/RainSnowIceLegend/RainSnowIceLegend.types.d.ts +18 -0
  13. package/dist/components/WeatherLegend/RainSnowIceLegend/index.d.ts +2 -0
  14. package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.constants.d.ts +2 -0
  15. package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.d.ts +3 -0
  16. package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.types.d.ts +12 -0
  17. package/dist/components/WeatherLegend/WeatherAlertsLegend/index.d.ts +2 -0
  18. package/dist/components/WeatherLegend/WeatherLegend.d.ts +3 -0
  19. package/dist/components/WeatherLegend/WeatherLegend.types.d.ts +19 -0
  20. package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.constants.d.ts +2 -0
  21. package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.d.ts +3 -0
  22. package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.types.d.ts +15 -0
  23. package/dist/components/WeatherLegend/WeatherTemperaturesLegend/index.d.ts +2 -0
  24. package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.constants.d.ts +6 -0
  25. package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.d.ts +3 -0
  26. package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.types.d.ts +15 -0
  27. package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/index.d.ts +2 -0
  28. package/dist/components/WeatherLegend/index.d.ts +6 -0
  29. package/dist/components/index.d.ts +1 -0
  30. package/dist/controls/createWeatherLayerControl.factory.d.ts +3 -0
  31. package/dist/controls/index.d.ts +1 -0
  32. package/dist/controls/types/controls.types.d.ts +14 -1
  33. package/dist/controls/utils/index.d.ts +4 -0
  34. package/dist/controls/utils/weatherLayers.constants.d.ts +5 -0
  35. package/dist/controls/utils/weatherLayers.helpers.d.ts +12 -0
  36. package/dist/controls/utils/weatherLayers.rendering.d.ts +2 -0
  37. package/dist/controls/utils/weatherLayers.types.d.ts +1 -0
  38. package/dist/createMap/errorMap/createMap.error.d.ts +3 -2
  39. package/dist/createMap/types/createMap.types.d.ts +7 -2
  40. package/dist/helpers/parseStringAsJson.d.ts +1 -1
  41. package/dist/index.cjs +309 -241
  42. package/dist/index.js +23909 -23037
  43. package/dist/types/common.enums.d.ts +23 -0
  44. package/dist/types/common.types.d.ts +13 -0
  45. package/dist/utils/constants.d.ts +28 -0
  46. package/dist/utils/helpers/getBrowserInfo.helper.d.ts +2 -0
  47. package/dist/utils/helpers/getMailToSupportHrefLink.helper.d.ts +8 -0
  48. package/dist/utils/helpers/limitEmailLength.helper.d.ts +2 -0
  49. package/dist/utils/helpers/prepareAppErrorMailToData.helper.d.ts +7 -0
  50. package/dist/utils/helpers/prepareContactSupportMandatoryFields.helper.d.ts +4 -0
  51. package/dist/utils/types.d.ts +13 -0
  52. package/dist/utils/version.d.ts +1 -0
  53. package/package.json +5 -4
  54. package/dist/helpers/getMailToSupportHrefLink.helper.d.ts +0 -13
@@ -1,6 +1,7 @@
1
- import { MapBaseLayer } from "../../types";
1
+ import { GeneralAppSettings, MapBaseLayer } from "../../types";
2
2
  export declare const DEFAULT_BASE_LAYER = MapBaseLayer.STREETS;
3
- export declare const DEFAULT_BASE_API_URL = "https://proxy-nodejs.prd.milemaker.com/proxy";
3
+ export declare const DEFAULT_GENERAL_APP_SETTINGS: GeneralAppSettings;
4
+ export declare const DEFAULT_BASE_API_URL = "https://proxy-nodejs.prd.milemaker.com";
4
5
  export declare const DEFAULT_ROUTE_COLOR = "rgba(0, 0, 0, 0.87)";
5
6
  export declare const MAP_FIT_INTO_BOUNDS_DEFAULT_PADDING = 100;
6
7
  export declare const MAP_DEFAULT_POLYLINE_STROKE_WIDTH = 5;
@@ -1,4 +1,4 @@
1
- import { MapBaseLayer } from "../types";
1
+ import { GeneralAppSettings, MapBaseLayer } from "../types";
2
2
  import { CreateActionsFactory, MapActions } from "./types";
3
3
  export * from "./zoom";
4
4
  export * from "./layer";
@@ -6,5 +6,8 @@ export * from "./layer";
6
6
  export * from "./marker";
7
7
  export * from "./popup";
8
8
  export declare const createMapActionFactory: CreateActionsFactory<MapActions, {
9
+ accessToken: string;
10
+ baseApiUrl: string;
9
11
  defaultBaseLayer?: MapBaseLayer;
12
+ generalAppSettings?: GeneralAppSettings;
10
13
  }>;
@@ -2,5 +2,5 @@ import { MapBaseLayer } from "../../types";
2
2
  import { CreateActionsFactory } from "../types";
3
3
  import { BaseLayerActions } from "./types";
4
4
  export declare const baseLayerActionsFactory: CreateActionsFactory<BaseLayerActions, {
5
- defaultBaseLayer?: MapBaseLayer;
5
+ defaultBaseLayer: MapBaseLayer;
6
6
  }>;
@@ -1,6 +1,9 @@
1
- import { MapBaseLayer } from "../../types";
1
+ import { GeneralAppSettings, MapBaseLayer } from "../../types";
2
2
  import { CreateActionsFactory } from "../types";
3
3
  import { MapLayerActions } from "./types";
4
4
  export declare const layerActionsFactory: CreateActionsFactory<MapLayerActions, {
5
- defaultBaseLayer?: MapBaseLayer;
5
+ accessToken: string;
6
+ baseApiUrl: string;
7
+ defaultBaseLayer: MapBaseLayer;
8
+ generalAppSettings: GeneralAppSettings;
6
9
  }>;
@@ -1,4 +1,4 @@
1
- import { MapBaseLayer } from "../../../types";
1
+ import { MapBaseLayer, WeatherLayer } from "../../../types";
2
2
  /**
3
3
  * Base layer actions
4
4
  * @interface
@@ -10,15 +10,15 @@ export type BaseLayerActions = {
10
10
  * Change current base layer
11
11
  * @param baseLayer - Base layer to set
12
12
  */
13
- changeBaseLayer(baseLayer: MapBaseLayer): void;
13
+ change(baseLayer: MapBaseLayer): void;
14
14
  /**
15
15
  * Get current base layer
16
16
  */
17
- getCurrentBaseLayer(): MapBaseLayer;
17
+ getCurrent(): MapBaseLayer;
18
18
  /**
19
19
  * Get is given base layer currently visible
20
20
  */
21
- getIsVisibleBaseLayer(baseLayer: MapBaseLayer): boolean;
21
+ getIsVisible(baseLayer: MapBaseLayer): boolean;
22
22
  };
23
23
  /**
24
24
  * Traffic layer actions
@@ -30,15 +30,15 @@ export type TrafficLayerActions = {
30
30
  /**
31
31
  * Show traffic layer
32
32
  */
33
- showTrafficLayer(): void;
33
+ show(): void;
34
34
  /**
35
35
  * Hide traffic layer
36
36
  */
37
- hideTrafficLayer(): void;
37
+ hide(): void;
38
38
  /**
39
39
  * Get is traffic layer visible
40
40
  */
41
- getIsVisibleTrafficLayer(): boolean;
41
+ getIsVisible(): boolean;
42
42
  /**
43
43
  * Toggle traffic layer visibility
44
44
  */
@@ -54,20 +54,40 @@ export type TruckRestrictionsLayerActions = {
54
54
  /**
55
55
  * Show truck restrictions layer
56
56
  */
57
- showTruckRestrictionsLayer(): void;
57
+ show(): void;
58
58
  /**
59
59
  * Hide truck restrictions layer
60
60
  */
61
- hideTruckRestrictionsLayer(): void;
61
+ hide(): void;
62
62
  /**
63
63
  * Get is truck restrictions layer visible
64
64
  */
65
- getIsVisibleTruckRestrictionsLayer(): boolean;
65
+ getIsVisible(): boolean;
66
66
  /**
67
67
  * Toggle truck restrictions layer visibility
68
68
  */
69
69
  toggle(): void;
70
70
  };
71
+ /**
72
+ * Weather layer actions
73
+ * @interface
74
+ * @group Actions
75
+ * @category Layers
76
+ */
77
+ export type WeatherLayerActions = {
78
+ /**
79
+ * Show weather layer
80
+ */
81
+ show(weatherLayer: WeatherLayer | WeatherLayer[]): void;
82
+ /**
83
+ * Hide weather layer
84
+ */
85
+ hide(weatherLayer: WeatherLayer | WeatherLayer[]): void;
86
+ /**
87
+ * Get is weather layer visible
88
+ */
89
+ getIsVisible(weatherLayer: WeatherLayer | WeatherLayer[]): boolean;
90
+ };
71
91
  /**
72
92
  * Map layer actions
73
93
  * @interface
@@ -87,4 +107,8 @@ export type MapLayerActions = {
87
107
  * Truck restrictions layer actions
88
108
  */
89
109
  truckRestrictionsLayerActions: TruckRestrictionsLayerActions;
110
+ /**
111
+ * Weather layer actions
112
+ */
113
+ weatherLayerActions: WeatherLayerActions;
90
114
  };
@@ -0,0 +1,8 @@
1
+ import { GeneralAppSettings } from "../../types";
2
+ import { CreateActionsFactory } from "../types";
3
+ import { WeatherLayerActions } from "./types";
4
+ export declare const weatherLayerActionsFactory: CreateActionsFactory<WeatherLayerActions, {
5
+ accessToken: string;
6
+ baseApiUrl: string;
7
+ generalAppSettings: GeneralAppSettings;
8
+ }>;
@@ -12,7 +12,7 @@ export type Marker = {
12
12
  * Move marker to given coordinate
13
13
  * @param lonLatLike - Coordinate to move marker
14
14
  */
15
- moveMarker(lonLatLike: LonLatLike): void;
15
+ move(lonLatLike: LonLatLike): void;
16
16
  /**
17
17
  * Get marker's coordinate
18
18
  */
@@ -12,7 +12,7 @@ export type Popup = {
12
12
  * Move popup to given coordinate
13
13
  * @param lonLatLike - Coordinate to move popup
14
14
  */
15
- movePopup(lonLatLike: LonLatLike): void;
15
+ move(lonLatLike: LonLatLike): void;
16
16
  /**
17
17
  * Get popup's coordinate
18
18
  */
@@ -1,3 +1,3 @@
1
1
  import "./Popper.scss";
2
2
  import { PopperInstance, PopperOptions } from "./Popper.types";
3
- export declare const createPopper: (anchorElement: HTMLElement, content: string, options?: PopperOptions) => PopperInstance;
3
+ export declare const createPopper: (anchorElement: HTMLElement, content: string, options: PopperOptions) => PopperInstance;
@@ -10,6 +10,8 @@ export type PopperOffset = {
10
10
  y?: number;
11
11
  };
12
12
  export type PopperOptions = {
13
+ id: string;
14
+ header?: string;
13
15
  placement?: PopperPlacement;
14
16
  offset?: PopperOffset;
15
17
  flip?: boolean;
@@ -26,4 +28,5 @@ export type PopperInstance = {
26
28
  show(): void;
27
29
  hide(): void;
28
30
  getIsVisible(): boolean;
31
+ getId(): string;
29
32
  };
@@ -0,0 +1,3 @@
1
+ import "./RainSnowIceLegend.scss";
2
+ import { RainSnowIceLegendInstance, RainSnowIceLegendOptions } from "./RainSnowIceLegend.types";
3
+ export declare const createRainSnowIceLegend: (options: RainSnowIceLegendOptions) => RainSnowIceLegendInstance;
@@ -0,0 +1,18 @@
1
+ export declare enum LegendType {
2
+ RAIN = "rain",
3
+ SNOW = "snow",
4
+ ICE = "ice"
5
+ }
6
+ export type LegendColors = Record<LegendType, string[]>;
7
+ export type RainSnowIceLegendOptions = {
8
+ title: string;
9
+ isVisible: boolean;
10
+ parentElement: HTMLElement;
11
+ accessToken: string;
12
+ };
13
+ export type RainSnowIceLegendInstance = {
14
+ show(): void;
15
+ hide(): void;
16
+ destroy(): void;
17
+ getIsVisible(): boolean;
18
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./RainSnowIceLegend";
2
+ export * from "./RainSnowIceLegend.types";
@@ -0,0 +1,2 @@
1
+ export declare const LEGEND_URL = "https://legends.aerisapi.com/advisories-r7-col5-p15,5.svg";
2
+ export declare const SEVERE_LABELS_MATCHES: string[];
@@ -0,0 +1,3 @@
1
+ import "./WeatherAlertsLegend.scss";
2
+ import { WeatherAlertsLegendInstance, WeatherAlertsLegendOptions } from "./WeatherAlertsLegend.types";
3
+ export declare const createWeatherAlertsLegend: (options: WeatherAlertsLegendOptions) => WeatherAlertsLegendInstance;
@@ -0,0 +1,12 @@
1
+ export type WeatherAlertsLegendOptions = {
2
+ title: string;
3
+ isVisible: boolean;
4
+ parentElement: HTMLElement;
5
+ accessToken: string;
6
+ };
7
+ export type WeatherAlertsLegendInstance = {
8
+ show(): void;
9
+ hide(): void;
10
+ destroy(): void;
11
+ getIsVisible(): boolean;
12
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./WeatherAlertsLegend";
2
+ export * from "./WeatherAlertsLegend.types";
@@ -0,0 +1,3 @@
1
+ import "./WeatherLegend.scss";
2
+ import { WeatherLegendInstance, WeatherLegendOptions } from "./WeatherLegend.types";
3
+ export declare const createWeatherLegend: (parentElement: HTMLElement, options: WeatherLegendOptions) => WeatherLegendInstance;
@@ -0,0 +1,19 @@
1
+ export type WeatherLegendOptions = {
2
+ title: string;
3
+ isVisible: boolean;
4
+ fetchLegend: () => Promise<void>;
5
+ renderData: () => string;
6
+ accessToken: string;
7
+ };
8
+ export type WeatherLegendInstance = {
9
+ show(): void;
10
+ hide(): void;
11
+ update(options: Partial<WeatherLegendOptions>): void;
12
+ destroy(): void;
13
+ getIsVisible(): boolean;
14
+ };
15
+ export declare enum WeatherLegendState {
16
+ LOADING = "loading",
17
+ ERROR = "error",
18
+ SUCCESS = "success"
19
+ }
@@ -0,0 +1,2 @@
1
+ import { UnitsFormat } from "../../../types";
2
+ export declare const LEGEND_TEMPERATURES_URLS_PER_UNITS: Record<UnitsFormat, string>;
@@ -0,0 +1,3 @@
1
+ import "./WeatherTemperaturesLegend.scss";
2
+ import { WeatherTemperaturesLegendInstance, WeatherTemperaturesLegendOptions } from "./WeatherTemperaturesLegend.types";
3
+ export declare const createWeatherTemperaturesLegend: (options: WeatherTemperaturesLegendOptions) => WeatherTemperaturesLegendInstance;
@@ -0,0 +1,15 @@
1
+ import { UnitsFormat } from "../../../types";
2
+ export type WeatherTemperaturesLegendOptions = {
3
+ title: string;
4
+ isVisible: boolean;
5
+ parentElement: HTMLElement;
6
+ units: UnitsFormat;
7
+ accessToken: string;
8
+ };
9
+ export type WeatherTemperaturesLegendInstance = {
10
+ show(): void;
11
+ hide(): void;
12
+ destroy(): void;
13
+ getIsVisible(): boolean;
14
+ updateUnits(units: UnitsFormat): void;
15
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./WeatherTemperaturesLegend";
2
+ export * from "./WeatherTemperaturesLegend.types";
@@ -0,0 +1,6 @@
1
+ import { UnitsFormat } from "../../../types";
2
+ export declare const LEGEND_WIND_SPEEDS_URLS_PER_UNITS: Record<UnitsFormat, string>;
3
+ export declare const LEGEND_WIND_SPEEDS_UNITS_LABELS: {
4
+ imperial: string;
5
+ metric: string;
6
+ };
@@ -0,0 +1,3 @@
1
+ import "./WeatherWindSpeedsLegend.scss";
2
+ import { WeatherWindSpeedsLegendInstance, WeatherWindSpeedsLegendOptions } from "./WeatherWindSpeedsLegend.types";
3
+ export declare const createWeatherWindSpeedsLegend: (options: WeatherWindSpeedsLegendOptions) => WeatherWindSpeedsLegendInstance;
@@ -0,0 +1,15 @@
1
+ import { UnitsFormat } from "../../../types";
2
+ export type WeatherWindSpeedsLegendOptions = {
3
+ title: string;
4
+ isVisible: boolean;
5
+ parentElement: HTMLElement;
6
+ units: UnitsFormat;
7
+ accessToken: string;
8
+ };
9
+ export type WeatherWindSpeedsLegendInstance = {
10
+ show(): void;
11
+ hide(): void;
12
+ destroy(): void;
13
+ getIsVisible(): boolean;
14
+ updateUnits(units: UnitsFormat): void;
15
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./WeatherWindSpeedsLegend";
2
+ export * from "./WeatherWindSpeedsLegend.types";
@@ -0,0 +1,6 @@
1
+ export * from "./WeatherLegend";
2
+ export * from "./WeatherLegend.types";
3
+ export * from "./RainSnowIceLegend";
4
+ export * from "./WeatherTemperaturesLegend";
5
+ export * from "./WeatherWindSpeedsLegend";
6
+ export * from "./WeatherAlertsLegend";
@@ -6,3 +6,4 @@ export * from "./Menu/Menu.types";
6
6
  export * from "./Radio/RadioButton";
7
7
  export * from "./Radio/RadioButtonGroup";
8
8
  export * from "./Radio/Radio.types";
9
+ export * from "./WeatherLegend";
@@ -0,0 +1,3 @@
1
+ import "./styles/weatherLayerControl.scss";
2
+ import { ControlCreatorFactory, WeatherLayerControl } from "./types";
3
+ export declare const createWeatherLayerControlFactory: ControlCreatorFactory<WeatherLayerControl>;
@@ -4,4 +4,5 @@ export * from "./createCurrentPositionControl.factory";
4
4
  export * from "./createTrafficLayerControl.factory";
5
5
  export * from "./createTruckRestrictionsLayerControl.factory";
6
6
  export * from "./createOverlayLayerControl.factory";
7
+ export * from "./createWeatherLayerControl.factory";
7
8
  export * from "./createZoomControl.factory";
@@ -97,6 +97,12 @@ export type TruckRestrictionsLayerControl = BaseMapControl;
97
97
  * @interface
98
98
  */
99
99
  export type OverlayLayerControl = BaseMapControl;
100
+ /**
101
+ * Weather layer control
102
+ * @group Map Controls
103
+ * @interface
104
+ */
105
+ export type WeatherLayerControl = BaseMapControl;
100
106
  /**
101
107
  * Zoom control
102
108
  * @group Map Controls
@@ -128,7 +134,14 @@ export type MapControlCreators = {
128
134
  * Creates and returns an overlay layer control instance.
129
135
  * @function
130
136
  */
131
- createOverlayLayerControl: (options?: BaseControlCreatorOptions) => OverlayLayerControl;
137
+ createOverlayLayerControl: (options?: BaseControlCreatorOptions & {
138
+ accessToken: string;
139
+ }) => OverlayLayerControl;
140
+ /**
141
+ * Creates and returns a weather layer control instance.
142
+ * @function
143
+ */
144
+ createWeatherLayerControl: (options?: BaseControlCreatorOptions) => WeatherLayerControl;
132
145
  /**
133
146
  * Creates and returns a zoom control instance.
134
147
  * @function
@@ -0,0 +1,4 @@
1
+ export * from "./weatherLayers.constants";
2
+ export * from "./weatherLayers.helpers";
3
+ export * from "./weatherLayers.rendering";
4
+ export * from "./weatherLayers.types";
@@ -0,0 +1,5 @@
1
+ import { WeatherLayer } from "../../types";
2
+ import { WeatherLayerType } from "./weatherLayers.types";
3
+ export declare const WEATHER_LAYER_MAP: Record<WeatherLayerType, WeatherLayer | WeatherLayer[]>;
4
+ export declare const WEATHER_LAYER_LABELS: Record<WeatherLayerType, string>;
5
+ export declare const WEATHER_LAYER_OPTIONS: WeatherLayerType[];
@@ -0,0 +1,12 @@
1
+ import { WeatherLayerActions } from "../../actions/layer/types";
2
+ import { WeatherLayerType } from "./weatherLayers.types";
3
+ export declare const getSelectedWeatherLayer: (weatherLayerActions: WeatherLayerActions) => WeatherLayerType | null;
4
+ export declare const showWeatherLayer: (weatherLayerActions: WeatherLayerActions, layerType: WeatherLayerType) => void;
5
+ export declare const hideWeatherLayer: (weatherLayerActions: WeatherLayerActions, layerType: WeatherLayerType) => void;
6
+ export declare const isWeatherLayerType: (value: string | null) => value is WeatherLayerType;
7
+ export declare const fetchSvgRectAndExtractColors: (svgUrl: string) => Promise<string[]>;
8
+ export declare const fetchSvgCircleAndExtractColorsAndLabels: (svgUrl: string, labelsMatches?: string[]) => Promise<{
9
+ color: string;
10
+ label: string;
11
+ }[]>;
12
+ export declare const fetchImageAsObjectUrl: (imageUrl: string) => Promise<string>;
@@ -0,0 +1,2 @@
1
+ import { WeatherLayerType } from "./weatherLayers.types";
2
+ export declare const renderWeatherLayerMenuItems: (selectedLayer: WeatherLayerType | null, radioGroupName: string) => string;
@@ -0,0 +1 @@
1
+ export type WeatherLayerType = "radar" | "alerts" | "satellite" | "roadConditions" | "temperatures" | "windSpeeds";
@@ -3,7 +3,8 @@ import "./styles/errorMap.scss";
3
3
  type RenderErrorMapProps = {
4
4
  container: HTMLElement | string;
5
5
  onRetry(): Promise<MapInstance>;
6
- error: Error;
6
+ error: unknown;
7
+ accessToken: string;
7
8
  };
8
- export declare const renderErrorMap: ({ container, onRetry, error }: RenderErrorMapProps) => void;
9
+ export declare const renderErrorMap: ({ container, onRetry, error, accessToken }: RenderErrorMapProps) => void;
9
10
  export {};
@@ -1,6 +1,6 @@
1
1
  import { MapActions } from "../../actions/types";
2
2
  import { AttributionControl, MapControlCreators } from "../../controls/types";
3
- import { LonLatLike, MapBaseLayer } from "../../types";
3
+ import { GeneralAppSettings, LonLatLike, MapBaseLayer } from "../../types";
4
4
  /**
5
5
  * Map initialization options.
6
6
  * @group Map Initialization
@@ -17,7 +17,7 @@ export type CreateMapProps = {
17
17
  accessToken: string;
18
18
  /**
19
19
  * Base Api Url
20
- * @default https://proxy-nodejs.prd.milemaker.com/proxy
20
+ * @default https://proxy-nodejs.prd.milemaker.com
21
21
  */
22
22
  baseApiUrl?: string;
23
23
  /**
@@ -35,6 +35,11 @@ export type CreateMapProps = {
35
35
  * @default [-97.98373685376561, 35.87721419596477]
36
36
  */
37
37
  initialCenter?: LonLatLike;
38
+ /**
39
+ * General application settings
40
+ * @default {units: UnitsFormat.IMPERIAL}
41
+ */
42
+ generalAppSettings?: GeneralAppSettings;
38
43
  /**
39
44
  * Callback function to be called when the map is ready. It receives a MapInstance as a parameter.
40
45
  * @event
@@ -1 +1 @@
1
- export declare const parseStringAsJson: (stg: string) => any;
1
+ export declare const parseStringAsJson: (stg?: string | undefined) => any;