IOS 7.1.1 broke my google location URL
Posted: Sat Jun 21, 2014 3:53 am
Livecode: 6.5.1
Back in January I published the latest release of my App and it tested fine under IOS 7.0.3.
Now on my iPhone with release 7.1.1 a minor part of my code is broken. Not sure how to fix.
Basically I read in the current latitude and longitude into variables and then construct a URL to pass to Google maps to map the location.
Here's the code snipets that worked before.
The "put empty" code is because I get spaces in the URL string which need to be removed to construct a valid URL. This all works under IOS 7.0.3.
This is the output: http://maps.google.com/?q=49.263768,-123.209553
Under IOS 7.1.1 the put empty code removes the comma and the negative sign before the "123".
This is the output: http://maps.google.com/?q=49.32417 123.07237
This tells me that something has changed either in Livecode or IOS. Clearly the spaces don't need to be removed anymore under the latest IOS release.
I'm not sure how to fix this so I support the latest IOS release but also older IOS releases? I'm sure there is a way but I'm a beginner programmer and I'm a bit stumped.
Back in January I published the latest release of my App and it tested fine under IOS 7.0.3.
Now on my iPhone with release 7.1.1 a minor part of my code is broken. Not sure how to fix.
Basically I read in the current latitude and longitude into variables and then construct a URL to pass to Google maps to map the location.
Here's the code snipets that worked before.
Code: Select all
---Here's the part where I store the coordinates---
put mobileSensorReading("Location",true) into tLocation
put tLocation["latitude"] into tLat
put tLocation["longitude"] into tLong
put tLocation["timestamp"] into tStamp
--Here's where I construct the URL
put "http://maps.google.com/?q="&&tlat&&","&&tlong into tgoog
put empty into char 27 of tgoog
put empty into char 36 of tgoog
put empty into char 37 of tgoog
This is the output: http://maps.google.com/?q=49.263768,-123.209553
Under IOS 7.1.1 the put empty code removes the comma and the negative sign before the "123".
This is the output: http://maps.google.com/?q=49.32417 123.07237
This tells me that something has changed either in Livecode or IOS. Clearly the spaces don't need to be removed anymore under the latest IOS release.
I'm not sure how to fix this so I support the latest IOS release but also older IOS releases? I'm sure there is a way but I'm a beginner programmer and I'm a bit stumped.