Esri / Trek2There

Trek2There™
Apache License 2.0
10 stars 5 forks source link

Enable Trek2There to listen to the application clipboard for coordinate copying #56

Closed defiantgoat closed 6 years ago

defiantgoat commented 7 years ago

If coordinates are copied to the clipboard, allow T2T to listen for data changes and react if the copied data matches the following schemes:

As JSON in the following format:

{ "latitude": latitude in decimal coordinates, "longitude": longitude in decimal coordinates }

Example:

{
    "latitude":55.434323,
    "longitude":-33.23533
}

As a string in the following format

latitude in decimal coordinates, longitude in decimal coordinates

Example

-89.44454,-179.34343433

IsmaelInRedlands commented 7 years ago

@defiantgoat It would not be nice to have Trek2There change the coordinates without a warning. I think prompting the user whenever coords are copied to clipboard is a good thing.

As for the format, it will be hard for the app to figure which coord is lat and which one is lon.

For example, in this case: -89.44454,-79.34343433 which one is which?

defiantgoat commented 7 years ago

@IsmaelInRedlands If the user is using a simple string, the responsibility will be on the user to ensure that it is latitude, longitude (y,x). Clearly if a value is greater than 90 then we could figure out, but that would be impossible to implement consistently.

defiantgoat commented 7 years ago

Added ability to swap coordinates that are copied from the clipboard (if they are valid).

Available from v 1.1.9 forward.

img_0402 img_0403

defiantgoat commented 7 years ago

This functionality is currently only working on iOS. Debugging now for Android.

defiantgoat commented 7 years ago

There is no current resolution in the AppFramework to allow this to work in Android devices. As of now, this is only an iOS available feature.

marikavertzonis commented 7 years ago

tested with 1.1.14 on ios android and windows. consider as working as expected on iOS and Windows.

keeping the issue open specifically for android.

marikavertzonis commented 6 years ago

with the changes in appframework at version 3.0, on android, we now get the message box 'it looks like you copied coordinates....' but it is not displayed in full and the app extent changes to the size of the message. you can accept the values, they do appear in the settings dialog and you can go back to the full screen view - but the app always stays small (the size of the dialog box). am testing with 3.0.4 of the app and confirm it works on ios without changing the size of the app window.

t2t_smalldialog

t2t_smallcoords

t2t_smalldisplay

dominikargast commented 6 years ago

@marikavertzonis test with 3.0.6

marikavertzonis commented 6 years ago

testing with 3.0.6 works great on android :).

this photo shows windows phone on left, android in middle and iphone on right.

copy paste dialog

dominikargast commented 6 years ago

@marikavertzonis test with 3.0.8

marikavertzonis commented 6 years ago

3.0.8 on windows phone 10, windows desktop 10, iphone 6 (ios 10.3.3), trimble tdc (android 6) now i see the same copy paste dialog on all devices and can successfully paste latitude and longitude in decimal coordinates.

nb: only latitude and longitude in decimal coordinates can be copy and pasted - #50 does introduce support for different coord systems. the finer detail of copy paste with different coords to be fleshed out in that issue and am closing this one.