If title, source, and destination options are included, apple-maps may fail to display directions
See original GitHub issueWhen I include source and destination lat/lng along with a title as options, apple-maps attempts to lookup the title as the destination. If the title is a custom name and apple-maps is unable to find it as a location, a “no results found” state is reached, and no directions are displayed.
I believe this is caused by line 72 within src/index.js
:
url += `&q=${title ? `${encodedTitle}&address=${encodedTitle}` : 'Location'}`
It seems as though the title is being treated as an address.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
If Maps isn't working on your Apple device
Turn on Location Services and Location Access for Maps. In the Settings app, tap Privacy, then tap Location Services.
Read more >Places Library | Maps JavaScript API - Google Developers
The input can be any kind of Place data, for example a business name or address. To make a Find Place from Query...
Read more >ios - How to invoke iPhone Maps for Directions with Current ...
But I'm wondering if it's possible to make the start address be the "Current Location" maps bookmark so that I can use the...
Read more >How to use multi-stop routing in iOS 16 using Apple Maps
Maps will calculate your route (or routes, if there are alternatives). In the text directions, tap on Add Stop and add the place,...
Read more >NissanConnect Support & FAQ | Nissan USA
NissanConnect® support. Make the most out of NissanConnect and drive in connected comfort and convenience, mile after mile. Have a question about feature ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Alright…I did some research:
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
It’s actually super confusing,
For “q”:
For “address”:
I did some testing without having a source destination…and seems to be working without
address
. With a destination (directions), it “works” but does not show thetitle
. I’m not sure if it’s supposed to but at least it’s not broken.Based on:
I propose:
Remove “address” as mentioned above. PR is attached.
Google Maps also seems to use the title.
EDIT: I guess that’s why
googleForceLatLon
exists 🤦