fleetmap-reports 1.0.873 → 1.0.875
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/package.json +1 -1
- package/src/speeding-report.js +3 -2
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -305,11 +305,12 @@ function getCountry (position) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
async function getRoadSpeedLimits (devices, routes, threshold, minimumMinutes = 0) {
|
|
308
|
-
const position = routes
|
|
308
|
+
const position = routes.find(p => getCountry(p))
|
|
309
309
|
const country = getCountry(position)
|
|
310
310
|
const config = {
|
|
311
311
|
CHL: getOSMSpeedingEvents,
|
|
312
|
-
MAR: getOSMSpeedingEvents
|
|
312
|
+
MAR: getOSMSpeedingEvents,
|
|
313
|
+
BRA: getOSMSpeedingEvents
|
|
313
314
|
}
|
|
314
315
|
const method = config[country] || getHereEvents
|
|
315
316
|
return method(devices, routes, threshold, minimumMinutes, country && country.code)
|