-
Notifications
You must be signed in to change notification settings - Fork 145
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
Copy coordinates and link to map #152
Comments
I think it's better to use buttons with text instead of buttons with pictures. Will add this function once I finish current higher priority tasks. |
I wanted to do this but cannot find a way to copy to clipboard in mobile browser with javascript. If anyone can suggest how to do this, I will try to implement this function in mobile UI. |
Oh, I've asked something unreal I think. It seems impossible about clipboard. But there is "Share..." button in mobile version of m.youtube.com. This solution fits my tasks: Quick send device coordinates via sms or email. |
According to this document iOS does not support message text in SMS URLs. However, it supports subject and body in Email URLs. According to this blog post some devices support both. So what should we do? I am thinking about four buttons:
SMS options will be hidden on iOS devices. |
It would be nice to add four buttons, but we shouldn't forget about design. If you can do it compact and prettily it would be cool. This buttons shouldn't overload design and be very noticeable. |
Maybe we can add two buttons like these: And then when button is clicked show a 'popover' with selection of what to send - link or data, see this for an example. |
Very nice, I like popover. |
Well, if we think about it as a 'share' function then I guess it is a common practice to have pictures. Will try to do my best to implement it in near future. |
I totally agree with you about pictures. May will useful project: https://github.com/google/material-design-icons/releases Thank you very much. |
Nice feature, |
HM, actually it generates same URL with same function as it does while sending EMails. How does your issue look like? |
By using chrome in Android mobile, when I access to demo page (http://d.traccar.litvak.su/m/), I can email URL like this: "http://www.openstreetmap.org/?mlat=-12.134655&mlon=-76.955914" but when send URL by SMS the pre-formatted message is: "http://www.openstreetmap.org/?mlat=-12.134655" (Long parameter is missing) And when I use the default browser of my Android (HTC M8) the message of URL is always (with email or SMS) Longitude parameter missing, example: "http://www.openstreetmap.org/?mlat=-12.134655" |
I think the symbol "&" should be formatted with ASCII, or something like that |
Ok, will look into this issue today. Unfortunately (or maybe fortunately :)), I don't have an android phone, so I have just tested this function only in desktop browser and in iPhone and iPad email only. Will check this in android simulator. |
I can confirm the problem. It is truncated before "&" symbol in sms. |
This is a bug in android, see this one https://code.google.com/p/android/issues/detail?id=12142 I think I have worked it out by placing |
It's seems working now. |
Thanks for testing. On my iPhone I get correct results in email, i.e. it shows ampersand Does the link with |
Hm, no it doesn't work in email. |
Thanks again for testing. This android is a buggy mess :( Let's wait for @johnnyrlq response to see whether it works on his devices. |
I have tested email and SMS notifications and worked fine in my android mobile. Congrats and thank you for this new feature. |
Thanks for testing. However, sending URL by email does not work for @Abyss777 now because the URL is wrong and does not point to the correct location. @johnnyrlq please confirm that such URLs are working fine for you (show you correct location when opened in mobile (or any other) web browser). Also can you please tell me Android versions on your devices? Maybe I could stick to android version somehow when processing emails. |
The URL sent by email and SMS works fine. Link sent: http://www.openstreetmap.org/?mlat=-12.081185&mlon=-77.008223 Lat&long data is right |
I have hard coded |
Latest version works correctly for me. My config: Applications for opening links to openstreetmap.org are Chrome and OsmAnd+, both open correctly PS: OsmAnd+ opened links with "%26" correctly but Chrome didn't. |
Thank you very much for testing, appreciate your help. |
Some observations
The URL with "%26" does not work correctly in chrome neither default browser. |
Thanks a lot for testing and such a detailed report. This all sounds like I should place these '%26' instead of ampersand only on default browser and only on android 4.4.2. Will do my best to work it out in nearest future. |
It would be nice have possibility to copy device coordinates and link to map in mobile version (and may be in full)
Something like this:
The first button copies formated device parameters:
The second one copies link to map like this:
If you like, I can send button pictures source.
The text was updated successfully, but these errors were encountered: