CEC-3933 - Ensure zoom to car on Vehicle Map load (#326)
* CEC-3933 - Parse VehiclePaths location data * changes * fixes * stuff * sort of works * fix * progress * refactor * fix vehicle paths query * digital twin shows map * new dashboard * wider digital twin map * snapshot * latest; using polylines * lag lng changes * stuff * path showing up * stuff * things * revert home page * whitespace * validation * more stuff * fix button issue * tests pass without mocking data * fix code smells * remove map from digital twin, add to tab * fix bug * marker click event working * individual colors * possible fix * fix warning * merge and remove unused code * small fixes * re add dashboard * snaps * CEC-3933 - Ensure zoom to car on Vehicle Map load
This commit is contained in:
@@ -60,15 +60,18 @@ const ComponentVehiclePathsMap = (props) => {
|
||||
|
||||
// validate each location
|
||||
for (let vinLocations of resultArray) {
|
||||
let path = []
|
||||
path[0] = vinLocations[0]
|
||||
path[1] = []
|
||||
for (let location of vinLocations[1]) {
|
||||
if (ValidateLocationVehiclePathsData(location) !== false) {
|
||||
path[1].push(location);
|
||||
// if there are points for the vin; skip if empty points array
|
||||
if (vinLocations[0] && vinLocations[1] && vinLocations[1][0]) {
|
||||
let path = []
|
||||
path[0] = vinLocations[0]
|
||||
path[1] = []
|
||||
for (let location of vinLocations[1]) {
|
||||
if (ValidateLocationVehiclePathsData(location) !== false) {
|
||||
path[1].push(location);
|
||||
}
|
||||
}
|
||||
points.push(path)
|
||||
}
|
||||
points.push(path)
|
||||
}
|
||||
|
||||
setMarkers(points);
|
||||
|
||||
Reference in New Issue
Block a user