Skip to content

Commit

Permalink
drt: show spearated iternaries
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Aug 22, 2023
1 parent a69bdcd commit 06feb37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion drt/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function generateEntitiesTrip(data) {
if (elem.sactive === true) {
for (const step of elem.mvalue.itineraryRemaining) {
if (step.type === 'ROUTE') {
all.push(step.routeEncoded);
all.push(polyline.encode(polyline.decode(step.routeEncoded, 6)));
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions journey/src/otp-ui/overlay-drt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ class DrtOverlay extends MapLayer {
}
}

const uuidv4 = () => {
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
);
}

const getPolyline = (itinerary) => {
return polyline.decode(itinerary)
}
Expand Down Expand Up @@ -248,7 +242,6 @@ class DrtOverlay extends MapLayer {
})}
</FeatureGroup>
<FeatureGroup>

{
locations.itinerary.map(itinerary => {
return (
Expand All @@ -258,7 +251,6 @@ class DrtOverlay extends MapLayer {
dashArray={overlayDrtConf.pathDash}
opacity={0.7}
weight={6}
key={uuidv4()}
>
<Popup>
<div className="otp-ui-mapOverlayPopup">
Expand Down

0 comments on commit 06feb37

Please sign in to comment.