@trakit/objects 0.0.16 → 0.0.17

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 (219) hide show
  1. package/Companies/NotificationServerEmail.d.ts +0 -2
  2. package/README.md +24 -24
  3. package/index.d.ts +1 -1
  4. package/package.json +37 -37
  5. package/trakit-objects.min.js +2 -2
  6. package/objects/API/Arrays.d.ts +0 -46
  7. package/objects/API/Base.d.ts +0 -19
  8. package/objects/API/BaseComponent.d.ts +0 -40
  9. package/objects/API/BaseCompound.d.ts +0 -19
  10. package/objects/API/Codifier.d.ts +0 -15
  11. package/objects/API/Constants.d.ts +0 -39
  12. package/objects/API/Conversion.d.ts +0 -255
  13. package/objects/API/Encoding.d.ts +0 -9
  14. package/objects/API/Files.d.ts +0 -21
  15. package/objects/API/Functions.d.ts +0 -196
  16. package/objects/API/Geography/Functions.d.ts +0 -236
  17. package/objects/API/Geography/Interfaces.d.ts +0 -150
  18. package/objects/API/Geography/LatLng.d.ts +0 -86
  19. package/objects/API/Geography/LatLngBounds.d.ts +0 -146
  20. package/objects/API/Geography/Position.d.ts +0 -74
  21. package/objects/API/Geography/StreetAddress.d.ts +0 -59
  22. package/objects/API/Geometry/Functions.d.ts +0 -114
  23. package/objects/API/Geometry/Interfaces.d.ts +0 -111
  24. package/objects/API/Geometry/Point.d.ts +0 -81
  25. package/objects/API/Geometry/Radial.d.ts +0 -110
  26. package/objects/API/Geometry/Rectangle.d.ts +0 -159
  27. package/objects/API/Geometry/Size.d.ts +0 -58
  28. package/objects/API/Guid.d.ts +0 -4
  29. package/objects/API/Interfaces/IAmCompany.d.ts +0 -11
  30. package/objects/API/Interfaces/IBelongAsset.d.ts +0 -15
  31. package/objects/API/Interfaces/IBelongBillingProfile.d.ts +0 -15
  32. package/objects/API/Interfaces/IBelongCompany.d.ts +0 -15
  33. package/objects/API/Interfaces/IDeserializable.d.ts +0 -13
  34. package/objects/API/Interfaces/IEnabled.d.ts +0 -10
  35. package/objects/API/Interfaces/IFileSize.d.ts +0 -9
  36. package/objects/API/Interfaces/IGlobal.d.ts +0 -11
  37. package/objects/API/Interfaces/IHavePermissions.d.ts +0 -20
  38. package/objects/API/Interfaces/IHavePreferences.d.ts +0 -29
  39. package/objects/API/Interfaces/IIconic.d.ts +0 -15
  40. package/objects/API/Interfaces/IIdUlong.d.ts +0 -10
  41. package/objects/API/Interfaces/ILabelled.d.ts +0 -10
  42. package/objects/API/Interfaces/INamed.d.ts +0 -13
  43. package/objects/API/Interfaces/IPictured.d.ts +0 -15
  44. package/objects/API/Interfaces/IRequestable.d.ts +0 -22
  45. package/objects/API/Interfaces/ISerializable.d.ts +0 -10
  46. package/objects/API/Interfaces/ISuspendable.d.ts +0 -16
  47. package/objects/API/Interfaces/IVisual.d.ts +0 -18
  48. package/objects/API/Maps.d.ts +0 -28
  49. package/objects/API/Objects.d.ts +0 -5
  50. package/objects/API/SearchPattern.d.ts +0 -46
  51. package/objects/API/TimeSpan.d.ts +0 -109
  52. package/objects/API/Timezone.d.ts +0 -44
  53. package/objects/API/Timezones.d.ts +0 -7
  54. package/objects/API/Types.d.ts +0 -132
  55. package/objects/Accounts/Contact.d.ts +0 -139
  56. package/objects/Accounts/Machine.d.ts +0 -139
  57. package/objects/Accounts/MultiFactorType.d.ts +0 -17
  58. package/objects/Accounts/NotificationMethod.d.ts +0 -17
  59. package/objects/Accounts/Permissions/Authorizer.d.ts +0 -204
  60. package/objects/Accounts/Permissions/Permission.d.ts +0 -56
  61. package/objects/Accounts/Permissions/PermissionEscalation.d.ts +0 -41
  62. package/objects/Accounts/Permissions/PermissionEscalationState.d.ts +0 -19
  63. package/objects/Accounts/Permissions/PermissionEscalationType.d.ts +0 -13
  64. package/objects/Accounts/Permissions/PermissionLevel.d.ts +0 -17
  65. package/objects/Accounts/Permissions/PermissionMethod.d.ts +0 -13
  66. package/objects/Accounts/Permissions/PermissionType.d.ts +0 -280
  67. package/objects/Accounts/SSOIdentityProvider.d.ts +0 -25
  68. package/objects/Accounts/Session.d.ts +0 -89
  69. package/objects/Accounts/SessionStatus.d.ts +0 -29
  70. package/objects/Accounts/SystemsOfUnits.d.ts +0 -13
  71. package/objects/Accounts/User.d.ts +0 -167
  72. package/objects/Accounts/UserAdvanced.d.ts +0 -53
  73. package/objects/Accounts/UserAuthentication.d.ts +0 -55
  74. package/objects/Accounts/UserGeneral.d.ts +0 -98
  75. package/objects/Accounts/UserGroup.d.ts +0 -51
  76. package/objects/Accounts/UserMFA.d.ts +0 -47
  77. package/objects/Accounts/UserNotifications.d.ts +0 -76
  78. package/objects/Accounts/UserSSO.d.ts +0 -37
  79. package/objects/Assets/Asset.d.ts +0 -218
  80. package/objects/Assets/AssetAdvanced.d.ts +0 -77
  81. package/objects/Assets/AssetAttribute.d.ts +0 -71
  82. package/objects/Assets/AssetDispatch.d.ts +0 -55
  83. package/objects/Assets/AssetGeneral.d.ts +0 -127
  84. package/objects/Assets/AssetPlaceStatus.d.ts +0 -31
  85. package/objects/Assets/AssetPlaceStatusType.d.ts +0 -17
  86. package/objects/Assets/AssetType.d.ts +0 -21
  87. package/objects/Behaviours/Behaviour.d.ts +0 -78
  88. package/objects/Behaviours/BehaviourLog.d.ts +0 -95
  89. package/objects/Behaviours/BehaviourLogType.d.ts +0 -21
  90. package/objects/Behaviours/BehaviourParameter.d.ts +0 -38
  91. package/objects/Behaviours/BehaviourParameterType.d.ts +0 -21
  92. package/objects/Behaviours/BehaviourScript.d.ts +0 -83
  93. package/objects/Billing/BillableBase.d.ts +0 -83
  94. package/objects/Billing/BillableSmsProfile.d.ts +0 -26
  95. package/objects/Billing/BillingCurrency.d.ts +0 -17
  96. package/objects/Billing/BillingCycle.d.ts +0 -17
  97. package/objects/Billing/BillingProfile.d.ts +0 -104
  98. package/objects/Billing/Hosting/BillableHostingBase.d.ts +0 -41
  99. package/objects/Billing/Hosting/BillableHostingLicense.d.ts +0 -30
  100. package/objects/Billing/Hosting/BillableHostingLicenseType.d.ts +0 -20
  101. package/objects/Billing/Hosting/BillableHostingRule.d.ts +0 -30
  102. package/objects/Billing/Hosting/BillableHostingType.d.ts +0 -41
  103. package/objects/Billing/Report/BillingReport.d.ts +0 -112
  104. package/objects/Billing/Report/BillingReportBreakdown.d.ts +0 -34
  105. package/objects/Billing/Report/BillingReportHostingSummary.d.ts +0 -36
  106. package/objects/Billing/Report/BillingReportLicenseBreakdown.d.ts +0 -79
  107. package/objects/Billing/Report/BillingReportServiceBreakdown.d.ts +0 -124
  108. package/objects/Billing/Report/BillingReportStatus.d.ts +0 -25
  109. package/objects/Billing/Report/BillingReportSummary.d.ts +0 -49
  110. package/objects/Companies/ColourStyle.d.ts +0 -25
  111. package/objects/Companies/Company.d.ts +0 -167
  112. package/objects/Companies/CompanyDirectory.d.ts +0 -52
  113. package/objects/Companies/CompanyGeneral.d.ts +0 -55
  114. package/objects/Companies/CompanyPolicy.d.ts +0 -66
  115. package/objects/Companies/CompanyReseller.d.ts +0 -166
  116. package/objects/Companies/CompanyStyle.d.ts +0 -50
  117. package/objects/Companies/LabelStyle.d.ts +0 -46
  118. package/objects/Companies/NotificationServerEmail.d.ts +0 -99
  119. package/objects/Companies/NotificationServerSms.d.ts +0 -25
  120. package/objects/Companies/PasswordExpiryMode.d.ts +0 -17
  121. package/objects/Companies/PasswordPolicy.d.ts +0 -51
  122. package/objects/Companies/SessionMultiUser.d.ts +0 -17
  123. package/objects/Companies/SessionPolicy.d.ts +0 -47
  124. package/objects/Dispatch/DispatchDirection.d.ts +0 -53
  125. package/objects/Dispatch/DispatchJob.d.ts +0 -107
  126. package/objects/Dispatch/DispatchJobPriority.d.ts +0 -25
  127. package/objects/Dispatch/DispatchStep.d.ts +0 -99
  128. package/objects/Dispatch/DispatchStepState.d.ts +0 -27
  129. package/objects/Dispatch/DispatchStepStatus.d.ts +0 -21
  130. package/objects/Dispatch/DispatchTask.d.ts +0 -154
  131. package/objects/Dispatch/DispatchTaskStatus.d.ts +0 -50
  132. package/objects/Hosting/Document.d.ts +0 -70
  133. package/objects/Hosting/Fields/FormFieldAttachments.d.ts +0 -31
  134. package/objects/Hosting/Fields/FormFieldBase.d.ts +0 -56
  135. package/objects/Hosting/Fields/FormFieldBase_fromJSON.d.ts +0 -1
  136. package/objects/Hosting/Fields/FormFieldBoolean.d.ts +0 -38
  137. package/objects/Hosting/Fields/FormFieldChoice.d.ts +0 -46
  138. package/objects/Hosting/Fields/FormFieldDate.d.ts +0 -26
  139. package/objects/Hosting/Fields/FormFieldNumeric.d.ts +0 -54
  140. package/objects/Hosting/Fields/FormFieldNumericSize.d.ts +0 -32
  141. package/objects/Hosting/Fields/FormFieldSignature.d.ts +0 -17
  142. package/objects/Hosting/Fields/FormFieldText.d.ts +0 -32
  143. package/objects/Hosting/Fields/FormFieldTime.d.ts +0 -37
  144. package/objects/Hosting/Fields/FormFieldTimezone.d.ts +0 -14
  145. package/objects/Hosting/FormFieldType.d.ts +0 -127
  146. package/objects/Hosting/FormResult.d.ts +0 -95
  147. package/objects/Hosting/FormTemplate.d.ts +0 -80
  148. package/objects/Images/Dashcam.d.ts +0 -63
  149. package/objects/Images/DashcamBase.d.ts +0 -97
  150. package/objects/Images/DashcamLive.d.ts +0 -36
  151. package/objects/Images/DashcamMediaType.d.ts +0 -17
  152. package/objects/Images/Icon.d.ts +0 -66
  153. package/objects/Images/IconGlyph.d.ts +0 -47
  154. package/objects/Images/IconLabel.d.ts +0 -29
  155. package/objects/Images/IconLayer.d.ts +0 -33
  156. package/objects/Images/Picture.d.ts +0 -72
  157. package/objects/Maintenance/MaintenanceInterval.d.ts +0 -48
  158. package/objects/Maintenance/MaintenanceJob.d.ts +0 -134
  159. package/objects/Maintenance/MaintenanceJobStatus.d.ts +0 -21
  160. package/objects/Maintenance/MaintenanceSchedule.d.ts +0 -118
  161. package/objects/Messaging/AlertPriority.d.ts +0 -17
  162. package/objects/Messaging/AssetAlert.d.ts +0 -29
  163. package/objects/Messaging/AssetMessage.d.ts +0 -40
  164. package/objects/Messaging/MessageBase.d.ts +0 -99
  165. package/objects/Messaging/MessageFolder.d.ts +0 -13
  166. package/objects/Messaging/MessageStatus.d.ts +0 -29
  167. package/objects/Messaging/MessageType.d.ts +0 -33
  168. package/objects/Places/Place.d.ts +0 -114
  169. package/objects/Places/PlaceType.d.ts +0 -25
  170. package/objects/Providers/Config/ProviderConfig.d.ts +0 -70
  171. package/objects/Providers/Config/ProviderRegistration.d.ts +0 -119
  172. package/objects/Providers/Config/ProviderScript.d.ts +0 -86
  173. package/objects/Providers/Config/ProviderScriptBlock.d.ts +0 -41
  174. package/objects/Providers/Config/ProviderScriptParameter.d.ts +0 -49
  175. package/objects/Providers/Config/ProviderScriptParameterType.d.ts +0 -17
  176. package/objects/Providers/Configuration/ProviderConfiguration.d.ts +0 -66
  177. package/objects/Providers/Configuration/ProviderConfigurationNode.d.ts +0 -66
  178. package/objects/Providers/Configuration/ProviderConfigurationType.d.ts +0 -62
  179. package/objects/Providers/Configuration/ProviderGeofenceBase.d.ts +0 -29
  180. package/objects/Providers/Configuration/ProviderGeofenceBase_fromJSON.d.ts +0 -1
  181. package/objects/Providers/Configuration/ProviderGeofenceCircular.d.ts +0 -28
  182. package/objects/Providers/Configuration/ProviderGeofencePoint.d.ts +0 -12
  183. package/objects/Providers/Configuration/ProviderGeofencePolygon.d.ts +0 -23
  184. package/objects/Providers/Configuration/ProviderGeofenceRectangle.d.ts +0 -28
  185. package/objects/Providers/Provider.d.ts +0 -205
  186. package/objects/Providers/ProviderAdvanced.d.ts +0 -50
  187. package/objects/Providers/ProviderCommand.d.ts +0 -36
  188. package/objects/Providers/ProviderCommandStatus.d.ts +0 -29
  189. package/objects/Providers/ProviderCommandType.d.ts +0 -37
  190. package/objects/Providers/ProviderControl.d.ts +0 -41
  191. package/objects/Providers/ProviderData.d.ts +0 -30
  192. package/objects/Providers/ProviderGeneral.d.ts +0 -121
  193. package/objects/Providers/ProviderType.d.ts +0 -106
  194. package/objects/Reports/ReportBreakdown.d.ts +0 -49
  195. package/objects/Reports/ReportBreakdownJob.d.ts +0 -37
  196. package/objects/Reports/ReportBreakdownMessage.d.ts +0 -40
  197. package/objects/Reports/ReportBreakdownTask.d.ts +0 -46
  198. package/objects/Reports/ReportBreakdown_fromJSON.d.ts +0 -1
  199. package/objects/Reports/ReportFilterMode.d.ts +0 -17
  200. package/objects/Reports/ReportNotifications.d.ts +0 -31
  201. package/objects/Reports/ReportOptions.d.ts +0 -52
  202. package/objects/Reports/ReportParameter.d.ts +0 -26
  203. package/objects/Reports/ReportParameterType.d.ts +0 -59
  204. package/objects/Reports/ReportRecurrence.d.ts +0 -54
  205. package/objects/Reports/ReportRecurrenceType.d.ts +0 -34
  206. package/objects/Reports/ReportResult.d.ts +0 -169
  207. package/objects/Reports/ReportResultData.d.ts +0 -17
  208. package/objects/Reports/ReportSchedule.d.ts +0 -111
  209. package/objects/Reports/ReportScorecard.d.ts +0 -38
  210. package/objects/Reports/ReportScorecardParameter.d.ts +0 -31
  211. package/objects/Reports/ReportScorecardRules.d.ts +0 -26
  212. package/objects/Reports/ReportStatus.d.ts +0 -29
  213. package/objects/Reports/ReportSummary.d.ts +0 -90
  214. package/objects/Reports/ReportSummaryReason.d.ts +0 -27
  215. package/objects/Reports/ReportTemplate.d.ts +0 -81
  216. package/objects/Reports/ReportTotal.d.ts +0 -47
  217. package/objects/Reports/ReportType.d.ts +0 -42
  218. package/objects/index.d.ts +0 -406
  219. package/objects/storage.d.ts +0 -176
@@ -1,236 +0,0 @@
1
- import { IPoint } from '../Geometry/Interfaces';
2
- import { int } from '../Types';
3
- import { ILatLng, ILatLngBounds } from './Interfaces';
4
- /**
5
- * The default precision used to serialize latlngs.
6
- */
7
- export declare const DEFAULT_PRECISION = 6;
8
- /**
9
- * The radius of the Earth in meters taken from the GRS-80, NAD83, and WGS-84 standards.
10
- */
11
- export declare const EARTH_RADIUS: number;
12
- /**
13
- * The ellipsoid of the Earth taken from the WGS-84 standard.
14
- * @default ~298.2572
15
- */
16
- export declare const EARTH_ELLIPSOID: number;
17
- /**
18
- * Inversion of the ellipsoid value for calculations.
19
- */
20
- export declare const EARTH_FLATENING: number;
21
- /**
22
- * The minor axis radius of an ellipsoid Earth as per WGS-84.
23
- * @default ~6356752.3142
24
- */
25
- export declare const EARTH_RADIUS_MINOR: number;
26
- /**
27
- * The surface area of the Earth in meters squared.
28
- * @default 511207893395811
29
- */
30
- export declare const EARTH_SURFACE: number;
31
- /**
32
- *
33
- */
34
- export declare const EARTH_RADIUS_RATIO: number;
35
- /**
36
- *
37
- */
38
- export declare const EARTH_RADIUS_ECCENT: number;
39
- /**
40
- *
41
- */
42
- export declare const EARTH_RADIUS_COM: number;
43
- /**
44
- *
45
- */
46
- export declare const TILE_SIZE_PX: number;
47
- /**
48
- *
49
- */
50
- export declare const MAX_TILE_LAT: number;
51
- /**
52
- *
53
- */
54
- export declare const MAX_TILE_LNG: number;
55
- /**
56
- * Determines the map width and height (in pixels) at a specified level of detail.
57
- * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail).
58
- * @returns The map width and height in pixels.
59
- */
60
- export declare function tileMapSize(zoom: int): int;
61
- /**
62
- * Converts tile coordinates into pixel coordinates of the upper-left pixel of the specified tile.
63
- * @param tile
64
- */
65
- export declare function tileToPixel(tile: IPoint): IPoint;
66
- /**
67
- * Converts pixel coordinates into tile coordinates of the tile containing the specified pixel.
68
- * @param pixel
69
- */
70
- export declare function pixelToTile(pixel: IPoint): IPoint;
71
- /**
72
- * Converts a pixel coordinate into a LatLng at a specified level of detail.
73
- * @param pixel
74
- * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail).
75
- */
76
- export declare function pixelToLatlng(pixel: IPoint, zoom: int): ILatLng;
77
- /**
78
- * Converts a LatLng into a pixel coordinate at a specified level of detail.
79
- * @param latlng
80
- * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail).
81
- */
82
- export declare function latlngToPixel(latlng: ILatLng, zoom: int): IPoint;
83
- /**
84
- * Converts tile coordinates into a lat/lng boundary representing a complete tile.
85
- * @param tile
86
- * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail).
87
- * @param grow Number of pixels to grow the tilesize (helps with detecting stroke/border overlaps).
88
- */
89
- export declare function tileToBounds(tile: IPoint, zoom: int, grow?: number): ILatLngBounds;
90
- /**
91
- * Converts pixel coordinates of a tile into a lat/lng boundary.
92
- * @param pixel
93
- * @param zoom Level of detail, from 1 (lowest detail) to 23 (highest detail).
94
- * @param grow Number of pixels to grow the tilesize (helps with detecting stroke/border overlaps).
95
- */
96
- export declare function pixelToBounds(pixel: IPoint, zoom: int, grow?: number): ILatLngBounds;
97
- /**
98
- * Returns the number of meters per pixel at the given latitude and zoom level.
99
- * @param lat
100
- * @param zoom
101
- */
102
- export declare function metresPerPixel(lat: number, zoom: int): number;
103
- /**
104
- * Checks to see if a given latitude is at one of the poles.
105
- * @param latitude
106
- */
107
- export declare function LATITUDE_IS_POLE(latitude: number): boolean;
108
- /**
109
- * Normalizes a latitude value between +/- 90.
110
- * Values of greater than 90 are returned as 90, and values less than -90 are returned as -90.
111
- * @param latitude
112
- * @param edge
113
- */
114
- export declare function LATITUDE_NORMALIZED(latitude: number, edge?: number): number;
115
- /**
116
- * Normalizes a longitude value between +/- 180.
117
- * Values of greater than 180 are returned as a negative difference of 360, and values less than -180 are returned as a positive difference of 360.
118
- * @param longitude
119
- * @param latitude When given, will check if the latitude is a pole, and converts the longitude to zero.
120
- */
121
- export declare function LONGITUDE_NORMALIZED(longitude: number, latitude?: number): number;
122
- /**
123
- * The distance in meters before considering to coordinates to have the same location.
124
- * @default 0.000000001
125
- */
126
- export declare const MAX_SAME_DISTANCE = 1e-9;
127
- /**
128
- * Bearing from coordinate A to coordinate B in degrees from North.
129
- * @param first The starting coordinate.
130
- * @param last The ending coordinate.
131
- * @return Degrees from North.
132
- */
133
- export declare function LATLNG_ANGLE(first: ILatLng, last: ILatLng): number;
134
- /**
135
- * Calculates the distance between two coordinates on a sphere.
136
- * @param first The starting coordinate.
137
- * @param last The ending coordinate.
138
- */
139
- export declare function LATLNG_DISTANCE(first: ILatLng, last: ILatLng): number;
140
- /**
141
- * Calculates the distance between two coordinates on a Bessel 1841 ellipsoid.
142
- * @param start The starting coordinate.
143
- * @param end The ending coordinate.
144
- */
145
- export declare function LATLNG_DISTANCE_VINCENTY(start: ILatLng, end: ILatLng): number;
146
- /**
147
- * Calculates the orthogonal height of a triangle. The orthogonal height is
148
- * calculated by drawing a line between the coordinate A and coordinate B,
149
- * then getting the length of a line drawn up from the line to the mid
150
- * coordinate at a 90 degree angle.
151
- * @param first Left-most coordinate on the great circle.
152
- * @param middle Top-most coordinate's latitude.
153
- * @param last Right-most coordinate's longitude on the great circle.
154
- * @return Value is negative when distance is to the right, and positive when distance to the left.
155
- */
156
- export declare function LATLNG_GREAT_CIRCLE(first: ILatLng, middle: ILatLng, last: ILatLng): number;
157
- /**
158
- * Calculates the final coordinate based on the given starting coordinate and vector.
159
- * @param pin The staring coordinate.
160
- * @param meters The distance away from this LatLng.
161
- * @param bearing The direction in which to calculate the new position in degrees from North.
162
- * @throws {Error} Either latitude or longitude is NaN.
163
- */
164
- export declare function LATLNG_TRANSLATE(pin: ILatLng, meters: number, bearing: number): ILatLng;
165
- /**
166
- * Calculates the mid-point between to given coordinate.
167
- * @param first Left-most coordinate.
168
- * @param last Right-most coordinate.
169
- * @throws {Error} Either latitude or longitude is NaN.
170
- */
171
- export declare function LATLNG_MIDPOINT(first: ILatLng, last: ILatLng): ILatLng;
172
- /**
173
- * Calculates the spherical-cap area occupied by the given radial distance.
174
- * @param pin The coordinate at which to calculate the area.
175
- * @param radius The distance from the centre of the circle to any point along the edge.
176
- */
177
- export declare function SPHERECAP_AREA(pin: ILatLng, radius: number): void;
178
- /**
179
- * Calculates the length of the given route.
180
- * @param route
181
- */
182
- export declare function ROUTE_LENGTH(route: ILatLng[]): number;
183
- /**
184
- * Performs a Douglas-Peucker path reduction based on the given tolerance.
185
- * @param route The array of coordinates representing a path.
186
- * @param tolerance Distance (in meters) threshold for candidate coordinates. Default is 0.
187
- */
188
- export declare function ROUTE_PEUCKER(route: ILatLng[], tolerance: number): ILatLng[];
189
- /**
190
- * An implementation of Google's Encoded Polyline Algorithm format.
191
- * https://developers.google.com/maps/documentation/utilities/polylinealgorithm
192
- * @param route The array of coordinates representing a path.
193
- * @param precision Optional number of decimal places to use to calculate the results. Default is 5.
194
- */
195
- export declare function ROUTE_ENCODE(route: ILatLng[], precision?: number): string;
196
- /**
197
- * An implementation of Google's Decoded Polyline Algorithm format.
198
- * https://developers.google.com/maps/documentation/utilities/polylinealgorithm
199
- * @param route The encoded string which represents the coordinates in a path.
200
- * @param precision Optional number of decimal places used to recalculate the results. Default is 5.
201
- */
202
- export declare function ROUTE_DECODE(route: string, precision?: number): ILatLng[];
203
- /**
204
- * Finds the widest section of the given route.
205
- * This is useful for path reduction and reorientation.
206
- * @param route The array of coordinates representing a path
207
- * @return An array of three items; the first is the widest distance, and the others are the start and end index within the given route.
208
- */
209
- export declare function GEOFENCE_WIDEST(route: ILatLng[]): [number, number, number];
210
- /**
211
- * Performs a Douglas-Peucker path reduction on a polygon for the given
212
- * tolerance. The start/end coordinates are variable and the end coordinate
213
- * is trimmed from the result.
214
- * @param route The array of coordinates representing a path
215
- * @param tolerance Distance (in meters) threshold for candidate coordinates. Default is 0.
216
- */
217
- export declare function GEOFENCE_PEUCKER(route: ILatLng[], tolerance?: number): ILatLng[];
218
- /**
219
- * Calculates the total area occupied by the given geofence.
220
- * @param route The array of coordinates representing a geofence.
221
- * @throws {Error} Not enough coordinates.
222
- */
223
- export declare function GEOFENCE_AREA(route: ILatLng[]): number;
224
- /**
225
- * A utility export function to determine if a given coordinate is inside the given geofence.
226
- * @param route The array of coordinates represents the path of the polygon.
227
- * @param pin The coordinate to be checked.
228
- */
229
- export declare function GEOFENCE_CONTAINS(route: ILatLng[], pin: ILatLng): boolean;
230
- /**
231
- * Wraps the given coordinates into a polygonal path.
232
- * The given coordinates do not need to be a path.
233
- * The returned path is not closed.
234
- * @param coordinates The array of coordinates on which to create the non-closed path
235
- */
236
- export declare function GEOFENCE_WRAPPER(route: ILatLng[]): ILatLng[];
@@ -1,150 +0,0 @@
1
- import { datetime, nothing } from '../Types';
2
- /**
3
- * A coordinate on the Earth.
4
- */
5
- export interface ILatLng {
6
- /**
7
- * Latitude.
8
- */
9
- lat: number;
10
- /**
11
- * Longitude.
12
- */
13
- lng: number;
14
- }
15
- /**
16
- * Returns true if the given pin conforms to the {@link ILatLng} interface.
17
- * @param pin
18
- * @returns
19
- */
20
- export declare function ILatLng_instanceOf(pin: any): pin is ILatLng;
21
- /**
22
- *
23
- * @param dot
24
- * @returns
25
- */
26
- export declare function ILatLng_clone(dot: ILatLng): ILatLng;
27
- /**
28
- * GPS position information.
29
- */
30
- export interface IPosition extends ILatLng {
31
- /**
32
- * Speed
33
- */
34
- speed: number | nothing;
35
- /**
36
- * Direction of travel
37
- */
38
- bearing: number | nothing;
39
- /**
40
- * Distance in meters from the sea level
41
- */
42
- altitude: number | nothing;
43
- /**
44
- * Threshold in meters for the accuracy of a position
45
- */
46
- accuracy: number | nothing;
47
- /**
48
- * The Date/Time of the GPS reading
49
- */
50
- dts: datetime;
51
- /**
52
- * A description of the current road-segment
53
- */
54
- address: string | nothing;
55
- /**
56
- * A better description of the current road-segment
57
- */
58
- streetAddress: IStreetAddress | nothing;
59
- /**
60
- * The posted speed limit for the road segment
61
- */
62
- speedLimit: number | nothing;
63
- }
64
- /**
65
- * Returns true if the given pin conforms to the {@link IPosition} interface.
66
- * @param pin
67
- * @returns
68
- */
69
- export declare function IPosition_instanceOf(pin: any): pin is IPosition;
70
- /**
71
- * A road segment description.
72
- */
73
- export interface IStreetAddress {
74
- /**
75
- * House number.
76
- */
77
- number: string | null;
78
- /**
79
- * Full street name.
80
- */
81
- street: string | null;
82
- /**
83
- * City name.
84
- */
85
- city: string | null;
86
- /**
87
- * Region name.
88
- */
89
- region: string | null;
90
- /**
91
- * Province or state code.
92
- * Codes should be a value from ISO 3166-2.
93
- */
94
- province: string;
95
- /**
96
- * Country code.
97
- * Codes should be a value from ISO 3166-1 alpha-2.
98
- */
99
- country: string;
100
- /**
101
- * Postal or zip code.
102
- */
103
- postal: string | null;
104
- /**
105
- * Indicates that there is a toll for the current road segment.
106
- */
107
- isToll: boolean | null;
108
- }
109
- /**
110
- * Returns true if the given pin conforms to the {@link IStreetAddress} interface.
111
- * @param address
112
- * @returns
113
- */
114
- export declare function IStreetAddress_instanceOf(address: any): address is IStreetAddress;
115
- /**
116
- * A rectangular boundary on a flat surface.
117
- */
118
- export interface ILatLngBounds {
119
- /**
120
- * Northern latitude
121
- */
122
- north: number;
123
- /**
124
- * Eastern longitude
125
- */
126
- east: number;
127
- /**
128
- * Southern latitude
129
- */
130
- south: number;
131
- /**
132
- * Western longitude
133
- */
134
- west: number;
135
- }
136
- /**
137
- * Returns true if the given box conforms to the {@link ILatLngBounds} interface.
138
- * @param box
139
- */
140
- export declare function ILatLngBounds_instanceOf(box: any): box is ILatLngBounds;
141
- /**
142
- *
143
- * @param box
144
- * @returns
145
- */
146
- export declare function ILatLngBounds_clone(box: ILatLngBounds): ILatLngBounds;
147
- /**
148
- * The types used to extend a {@link LatLngBounds}'s edges.
149
- */
150
- export type LatLngBoundsExpansion = ILatLng | ILatLngBounds | LatLngBoundsExpansion[];
@@ -1,86 +0,0 @@
1
- import { Point } from '../Geometry/Point';
2
- import { JsonObject } from '../Types';
3
- import { ILatLng } from './Interfaces';
4
- import { LatLngBounds } from './LatLngBounds';
5
- /**
6
- * A coordinate on the Earth.
7
- */
8
- export declare class LatLng implements ILatLng {
9
- /**
10
- * Let's consider the zero-zero coordinates to be invalid.
11
- */
12
- static readonly INVALID: LatLng;
13
- /**
14
- *
15
- * @param json
16
- */
17
- static fromJSON(json: ILatLng | JsonObject): LatLng;
18
- /**
19
- *
20
- * @param latlng
21
- * @param delimiter
22
- * @returns
23
- */
24
- static fromString(latlng: string, delimiter?: string): LatLng;
25
- /**
26
- * Latitude
27
- */
28
- readonly lat: number;
29
- /**
30
- * Longitude
31
- */
32
- readonly lng: number;
33
- constructor(lat: number, lng: number);
34
- /**
35
- * Returns a string representation of this {@link LatLng}.
36
- * @param delimiter The boundary is delimited by a comma (,) by default, but you can override with your own value.
37
- * @returns A string in the format of "lat,lng".
38
- */
39
- toString(delimiter?: string): string;
40
- /**
41
- * Creates a literal of this {@link LatLng}.
42
- * Used internally by {@link JSON.stringify}.
43
- */
44
- toJSON(): ILatLng;
45
- /**
46
- * Compares this LatLng to another to see if they are equivalent.
47
- * @param other The other LatLng to compare
48
- * @param tolerance Distance tolerance before considering two nearly identical coordinates to be equal.
49
- */
50
- isEqual(other: ILatLng, tolerance?: number): boolean;
51
- /**
52
- * Returns true if this coordinate is not NaN and not zero-zero.
53
- */
54
- isValid(): boolean;
55
- /**
56
- * Calculates the distance across the surface of the globe to another coordinate
57
- * @param pin
58
- */
59
- distanceTo(pin: ILatLng): number;
60
- /**
61
- * Calculates the starting bearing across the surface of the globe from the current coordinate to the given coordinate
62
- * @param pin
63
- */
64
- bearingTo(pin: ILatLng): number;
65
- /**
66
- * Returns a new coordinate at the given distance and bearing from this coordinate
67
- * @param meters
68
- * @param bearing
69
- */
70
- toTranslated(meters: number, bearing: number): LatLng;
71
- /**
72
- * Returns a new LatLng at the half-way point between this and the given LatLng.
73
- * @param pin The other coordinate.
74
- * @throws {Error} Either latitude or longitude is NaN
75
- */
76
- toBetween(pin: ILatLng): LatLng;
77
- /**
78
- * Creates a Point based on the given magnifier.
79
- */
80
- toRadians(magnifier?: number): Point;
81
- /**
82
- * Creates a square LatLngBounds centred around this LatLng.
83
- * @param radius The closest distance (in meters) from this coordinate to the edges of the new LatLngBounds.
84
- */
85
- toBounds(radius: number): LatLngBounds;
86
- }
@@ -1,146 +0,0 @@
1
- import { ISerializable } from '../Interfaces/ISerializable';
2
- import { JsonObject } from '../Types';
3
- import { ILatLng, ILatLngBounds, LatLngBoundsExpansion } from './Interfaces';
4
- import { LatLng } from './LatLng';
5
- /**
6
- * A boundary on the globe
7
- */
8
- export declare class LatLngBounds implements ILatLngBounds, ISerializable {
9
- /**
10
- *
11
- * @param json
12
- */
13
- static fromJSON(json: ILatLngBounds | JsonObject): LatLngBounds;
14
- /**
15
- * Northern latitude
16
- */
17
- north: number;
18
- /**
19
- * Eastern longitude
20
- */
21
- east: number;
22
- /**
23
- * Southern latitude
24
- */
25
- south: number;
26
- /**
27
- * Western longitude
28
- */
29
- west: number;
30
- constructor(...args: LatLngBoundsExpansion[]);
31
- /**
32
- * Returns a string representation of this {@link LatLng}.
33
- * @param delimiter The boundary is delimited by a comma (,) by default, but you can override with your own value.
34
- * @returns A string in the format of "lat,lng".
35
- */
36
- toString(delimiter?: string): string;
37
- /**
38
- * Creates a literal of this {@link LatLngBounds}.
39
- * Used internally by {@link JSON.stringify}.
40
- */
41
- toJSON(): {
42
- north: number;
43
- east: number;
44
- south: number;
45
- west: number;
46
- };
47
- /**
48
- * Compares this LatLng to another to see if they are equivalent.
49
- * @param other The other LatLng to compare
50
- * @param tolerance Distance tolerance before considering two nearly identical coordinates to be equal.
51
- */
52
- isEqual(other: ILatLngBounds, tolerance?: number): boolean;
53
- /**
54
- *
55
- */
56
- isValid(): boolean;
57
- /**
58
- *
59
- */
60
- isEmpty(): boolean;
61
- /**
62
- * Checks if a {@link LatLng} is contained within this boundary.
63
- * @param pin The point to check
64
- */
65
- contains(pin: ILatLng): boolean;
66
- /**
67
- * Checks if a {@link LatLngBounds} is contained within this boundary.
68
- * @expose
69
- * @this {LatLngBounds}
70
- * @param bounds The other boundary to check
71
- */
72
- encloses(bounds: ILatLngBounds): boolean;
73
- /**
74
- * Checks if a {@link LatLngBounds} overlaps this boundary.
75
- * Also returns true if either boundary's {@link LatLngBounds#encloses} returns true.
76
- * @param other The other boundary to check
77
- */
78
- overlaps(other: ILatLngBounds): boolean;
79
- /**
80
- *
81
- * @param object
82
- */
83
- private __expander;
84
- /**
85
- * Extends the boundary to envelop the given point(s) but does not automatically
86
- * validate. This comes in efficient when doing many operations on a single
87
- * PointBounds
88
- */
89
- expand(latlngs: LatLngBoundsExpansion): this;
90
- /**
91
- * Extends the boundary to envelop the given point(s) and automatically validates
92
- */
93
- extend(latlngs: LatLngBoundsExpansion): this;
94
- /**
95
- *
96
- */
97
- getCentre(): LatLng;
98
- /**
99
- *
100
- */
101
- getNorthEast(): LatLng;
102
- /**
103
- *
104
- */
105
- getNorthWest(): LatLng;
106
- /**
107
- *
108
- */
109
- getSouthEast(): LatLng;
110
- /**
111
- *
112
- */
113
- getSouthWest(): LatLng;
114
- /**
115
- * The mid-point coordinate between the north east and north west corners.
116
- */
117
- getNorthMiddle(): LatLng;
118
- /**
119
- * The mid-point coordinate between the south east and south west corners.
120
- */
121
- getSouthMiddle(): LatLng;
122
- /**
123
- * The mid-point coordinate between the north east and north west corners.
124
- */
125
- getEastMiddle(): LatLng;
126
- /**
127
- * The mid-point coordinate between the south east and south west corners.
128
- */
129
- getWestMiddle(): LatLng;
130
- /**
131
- * The distance in meters between the north-east corner and the south-west corner.
132
- */
133
- getDiagonalDistance(): number;
134
- /**
135
- * The distance in meters between the north-most border and the south-most border.
136
- */
137
- getLatitudinalDistance(): number;
138
- /**
139
- * The distance in meters between the east-most and the west-most points along the border closest to the equator.
140
- */
141
- getLongitudinalDistance(): number;
142
- /**
143
- *
144
- */
145
- validate(): this;
146
- }
@@ -1,74 +0,0 @@
1
- import { datetime, JsonObject, nothing } from '../Types';
2
- import { IPosition, IStreetAddress } from './Interfaces';
3
- import { LatLng } from './LatLng';
4
- import { StreetAddress } from './StreetAddress';
5
- /**
6
- * GPS position information
7
- */
8
- export declare class Position extends LatLng implements IPosition {
9
- /**
10
- *
11
- * @param json
12
- * @returns
13
- */
14
- static fromJSON(json: IPosition | JsonObject): Position;
15
- /**
16
- * Speed
17
- */
18
- readonly speed: number;
19
- /**
20
- * Direction of travel
21
- */
22
- readonly bearing: number;
23
- /**
24
- * Distance in meters from the sea level
25
- */
26
- readonly altitude: number;
27
- /**
28
- * Threshold in meters for the accuracy of a position
29
- */
30
- readonly accuracy: number;
31
- /**
32
- * The Date/Time of the GPS reading
33
- */
34
- readonly date: Date;
35
- /**
36
- * The Date/Time of the GPS reading
37
- */
38
- get dts(): string;
39
- /**
40
- * A better description of the current road-segment
41
- */
42
- readonly streetAddress: StreetAddress | null;
43
- /**
44
- * The posted speed limit for the road segment
45
- */
46
- readonly speedLimit: number | nothing;
47
- /**
48
- * Provider Identifier
49
- */
50
- readonly origin: string;
51
- /**
52
- * The road segment description
53
- */
54
- readonly address: string;
55
- constructor(lat?: number | nothing, lng?: number | nothing, speed?: number | nothing, bearing?: number | nothing, accuracy?: number | nothing, dts?: Date | number | datetime | nothing, address?: string | nothing, limit?: number | nothing, altitude?: number | nothing, street?: IStreetAddress | JsonObject | nothing);
56
- /**
57
- * Returns a text representation of this position.
58
- * Returned strings cannot be converted back into {@link Position}
59
- * objects, so don't use this for deserialization.
60
- * @param delimiter
61
- */
62
- toString(delimiter?: string): string;
63
- /**
64
- * Creates a literal of this {@link Position}.
65
- * Used internally by {@link JSON.stringify}.
66
- */
67
- toJSON(): IPosition;
68
- /**
69
- *
70
- * @param position
71
- * @returns
72
- */
73
- isEqual(position: Position | IPosition): boolean;
74
- }