Hello,
it is posible to split the variable location in latitude and logitude?
I need it in two variables.
Thanks.
GPS split in latitude and longitude
Moderator: Martin
Re: GPS split in latitude and longitude
Maybe you could use the split function?
List split(String s, String pattern)
Splits the string s into a list of strings by using the regular expression pattern as the delimiter.
Re: GPS split in latitude and longitude
I made a script for you to do it. Maybe there is an easiest way but it work.
http://automagic4android.com/flow.php?i ... 859f6b5854
http://automagic4android.com/flow.php?i ... 859f6b5854
-
- Posts: 11
- Joined: 19 Nov 2013 12:37
Re: GPS split in latitude and longitude
Thanks, but it does not work.pat2net wrote:I made a script for you to do it. Maybe there is an easiest way but it work.
http://automagic4android.com/flow.php?i ... 859f6b5854
-
- Posts: 11
- Joined: 19 Nov 2013 12:37
Re: GPS split in latitude and longitude
getElement({lat}),1); and getElement({lon}),1); does not work.Multimania wrote:Thanks, but it does not work.pat2net wrote:I made a script for you to do it. Maybe there is an easiest way but it work.
http://automagic4android.com/flow.php?i ... 859f6b5854
Re: GPS split in latitude and longitude
The script seems to contain some errors. Try this instead:
http://automagic4android.com/flow.php?i ... 862e287485
I'm using the following script to get latitude and longitude from the location variable:
http://automagic4android.com/flow.php?i ... 862e287485
I'm using the following script to get latitude and longitude from the location variable:
Code: Select all
loc = split("{location,locationformat,decimal}", ",");
latitude = getElement({loc}, 0);
longitude = getElement({loc}, 1);
Re: GPS split in latitude and longitude
I try it again and it work for me but I'm using the evaluation version of Automagic. Anyway I think the solution by Martin! is more simple then mine and it seem to work for everybody!
-
- Posts: 11
- Joined: 19 Nov 2013 12:37
Re: GPS split in latitude and longitude
Hi,Martin! wrote:The script seems to contain some errors. Try this instead:
http://automagic4android.com/flow.php?i ... 862e287485
I'm using the following script to get latitude and longitude from the location variable:Code: Select all
loc = split("{location,locationformat,decimal}", ","); latitude = getElement({loc}, 0); longitude = getElement({loc}, 1);
thanks. i have found the same way!
It works fine and fast