Question
Pegasystems Inc.
US
Last activity: 25 Oct 2024 10:32 EDT
Get Directions action is not working as expected onMobile
We are using the Get Directions action to route the user to the native mapping application on their mobile devices. On an iPhone, when user has Apple maps installed on their device, user is redirected to the browser to show the maps in google maps. We would like the user to be redirected to Apple maps and not mandate them to install Google maps due to this behavior.
pzpega_control_actions_getDirections.js line 55 has below logic to use google maps if iOS >= 8 and looks like this is wrong:
if (iosMajorVersion >= 8) { mapsURL = 'http://maps.google.com/maps?saddr='; mapsURL += (startAddress || myLocationTxt) + '&daddr=' + dAddress; } else { mapsURL = 'http://maps.apple.com/maps?saddr='; mapsURL += (startCurrent === 1 ? currentLocationTxt : (startAddress !== '' ? startAddress : currentLocationTxt)) + '&daddr=' + dAddress; }