MapSwitcher icon indicating copy to clipboard operation
MapSwitcher copied to clipboard

Apple maps link

Open cpo-ux opened this issue 2 years ago • 3 comments

Hi, thanks for the great extension.

I'd like apple maps links to be added, example below:

https://maps.apple.com/?q=81.673184,-120.798333

cpo-ux avatar Nov 02 '23 20:11 cpo-ux

Thanks for the request. Yes, that would be useful.

It does have a bit of a difference to other services in that it apparently just redirects to google maps on non-Apple devices. So it probably wouldn't make much sense to show it on linux or windows, for example.

It would be possible just to ignore it for non-supported platforms based on the agent string, when building the links. But maybe it would be better to use the agent string to initially configure it as enabled/disabled. And then the user could override this if necessary.

david-r-edgar avatar Nov 07 '23 13:11 david-r-edgar

Hi David, I don't have an iPhone. I started looking into this only because I wanted to give this type of link to iOS users. So for myself I'd like the ability to generate an apple maps link from windows. I also found out later that an Apple maps URL can be created in such a way that it will open on other platforms. That works with this type of link:

https://maps.apple.com/place?q=Here&ll=32.7502202,-114.765537

It doesn't matter what string is used after q= just as long as you're using both q= and ll= it will open apple maps on other platforms. Give it a try. Scroll mouse zoom doesn't work on chrome browser but otherwise it works fine. If you were to configure this type of apple maps link I think it would be good to have the lat and long in the part after the q= so like this:

https://maps.apple.com/place?q=32.7502202,-114.765537&ll=32.7502202,-114.765537

That's my 2 cents. Thanks again for the great extension.

More info:

https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html

cpo-ux avatar Nov 07 '23 14:11 cpo-ux