A simple question maybe but one which trial and error is not helping me figure out.
I'm working on a gps app and I use the following code (where the variables are strings) to get the location from the gps sensor:
Latitude = Location1.Latitude
Longitude = Location1.Longitude
It works fine getting the current coordinates, the problem I am having is that I need to take the longitude and add a small amount to it to make a second longitude variable so that the app shows the current gps position with a marker and then a second marker using the current latitude and newly calculated second longitude as the second coordinate set.
My current code (I have tried lots of alternatives) to do this is:
If IsNumber(Longitude) Then LongTest = Longitude - 0.0000001
LongTest is a float variable. However instead of taking a coordinate like -0.0995281 and making it equal 0.0995280 it ends up making a much longer number sometimes with an E in it and I am puzzled as to where I am going wrong. So at the risk of embarrassing myself can someone point out my error for me, please?
Thanks.
Dave