Skip to content

Commit

Permalink
change device type verification
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarre20 committed Jul 23, 2024
1 parent 0e1b570 commit 553e18d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/front/src/pages/Surveyor/map/mapUtils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export const generateMapsLink = (locations) => {
const destination = locations[locations.length - 1];
// multiple waypoints for Apple Maps was introduce with IOS16 this will not work if Iphone IOS is below 15
if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) {
const userAgent = navigator.userAgent;
if (/iPad|iPhone|iPod/.test(userAgent)) {
const waypoints = locations
.slice(0, -1)
.map((location) => `&daddr=${location.latitude},${location.longitude}`)
Expand Down

0 comments on commit 553e18d

Please sign in to comment.