-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map address should be clickable to bring up map app on mobile #518
Comments
This SO post is a good intro of how to link to a map from mobile devices. Potential solutions are:
Linking to maps.apple.com seems like the safest approach since it gets you to a map regardless of what device you're using. The only non-ideal case is when you are visiting from an Apple desktop, where I would prefer to have the map open as Google Maps in a browser tab, but the computer tries to open Apple Maps instead. Thoughts on which approach to use? I supposed we could also do some browser sniffing if you think it's worth it, but it seems like keeping code to a minimum is a goal for you over the next few months. |
@declan Haven't had a chance to look into this yet, but hope to today. Thanks for the research! |
Yeah, there are browser sniffing gems like https://github.com/fnando/browser that seem fairly minimal but I think at this stage that would be overkill for what this adds. An approach I'm thinking about is only responding with the map app route if the link is clicked using a touch event. This doesn't guarantee a mobile device, but will exclude a lot of desktop environments. Unfortunately, detecting input types consistently is the new version of the screen size variation and resolution boondoggle of mobile development. It could look something like this: create a JS module that hooks into links that have a certain CSS class added (maybe
Ties into #602 ... I don't think the zip and address both should be clickable and perform different functions. They could perform the same function (in-app location search vs open map app) depending on whether a click or touch event was used, but I'd lean toward confining the map-app function to the address shown on the map only, at least at this stage. The details map has its own infowindow that opens with the address as well, though that may easily go unnoticed. |
Hello! This issue looks like it still needs help! If you wrote this issue, you can always update the labels for specifying tasks, add more info in the description to make it easier to contribute, or re-write the title to make more contributors interested in helping out. Just doing a little 🌱 open source gardening 🌱 of Brigade projects! |
At this point I won't be implementing this, so maybe we should close the issue. |
Map info box address for a marker should be clickable on mobile to bring up map app.
The text was updated successfully, but these errors were encountered: