2

I have an AGOL web map for finding beach accesses in Florida. Within my pop-up I have a Google Maps link to get directions to the current access. Everything works fine on desktop, but the directions link doesn't work properly in the Explorer app. When I click the directions link it opens Google Maps with the destination as the Gulf of Mexico and the Current Location is way off (for example I am in Tallahassee,FL and it said I was at a Redbox in Palm Harbor,FL about 330 miles away). When looking at the same accesses on my desktop the directions work perfectly.

Directions Link in popup: https://www.google.com/maps/dir/Current+Location/{Y_LATITUDE},{X_LONGITUD}

I have also tried: http://maps.google.com/maps?saddr=Current+Location&daddr={Y_LATITUDE},{X_LONGITUD}

Some context: I am using Explorer app on IOS 8.3 and the web map is out of the box no custom code.The Lat/Long is populated from fields in the attributes.My location settings allow for Safari, Google Chrome and the explorer app to have access to my location and all three accurately show my location when I use their location features outside of this instance. This error occurs whether I am on WiFi or 4G.

When in the Explorer app if I copy the link instead of clicking, this is what is copied to my clipboard(looks ok except the lat/long values are truncated): http://maps.google.com/maps?saddr=Current+Location&daddr=29.95,-85.42

This is the URL that is shown when the link is clicked and Google Maps opens in Safari: https://www.google.com/maps/dir/Redbox,+207495-3414+Tampa+Road,+Palm+Harbor,+FL+34684/29.95,-85.42/@29.3194888,-83.8341354,9z/data=!4m6!4m5!1m2!1m1!1s0x88c2ed70bc996c9f:0xbf08cf8cc97df53f!1m0!3e0

When compared to the same access on the desktop:

Copied to clipboard: https://www.google.com/maps/dir/Current+Location/29.9460010011,-85.4170700002

When clicked and GM is opened in the browser: https://www.google.com/maps/dir/30.4305062,-84.2542195/29.946001,-85.41707/@30.2169314,-85.3848336,9z/data=!3m1!4b1!4m4!4m3!1m1!4e1!1m0

I apologize for the long explanation, if there is feedback in comments I will edit as necessary to clarify. I was unsure what info is useful so I added what I thought may be. I can also add screen shots if needed. I will also try adding the URL with a blank start location as this may be better from a UX standpoint.

1 Answer 1

1

You could try using the Google Maps app URL.

like this one:

comgooglemaps://?saddr=Google+Inc,+8th+Avenue,+New+York,+NY&daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&directionsmode=transit

doc link:

https://developers.google.com/maps/documentation/ios-sdk/urlscheme?hl=en

1
  • Thanks for the response, I haven't tried this I currently only have lat,longs for the locations. I am working on adding street addresses to see if they work better. I was also considering creating string fields for the lat,long to see if that would prevent them from being truncated. I think the root of the problem is the truncation of the lat/long value which in turn causes GM to choose a less accurate address. I'll make sure to update the post once I try these methods out. Feb 4, 2016 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.