Discussion Forums  >  Uncategorized

Replies: 10    Views: 251

CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
09/30/11 11:00 AM (14 years ago)

Why is the device location being sent as 0,0?

I'm sending my device location but in the php code it is displaying it as 0 for the latitude and longitude http://www.mysite.com/path/ClosestLocations.php?lat=[deviceLatitude]&lon=[deviceLongitude]
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 11:01 AM (14 years ago)
BTW, location services are turned on for the app
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/30/11 11:31 AM (14 years ago)
Good question. iOS? Android? buzztouch version? It sounds like the device's location is not being updated, it's a matter of figuring out why. How you go about this depends on the platform / version.
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 11:40 AM (14 years ago)
It's iOS. When I go to the maps pages though, it has the location displayed on the map
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 11:42 AM (14 years ago)
I am on the [not-to-be-mentioned-confidential-beta] version
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 11:58 AM (14 years ago)
BT version 1.5
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 12:24 PM (14 years ago)
Anyone?????
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/30/11 01:57 PM (14 years ago)
So, have a look at the Conolse in Xcode when the app launches, it will show you whether or not the GPS is turning on. If it is, the lat / lon should get merged into the URL you posted. It's a matter of figuring out that a) the location manager is turning on and getting location reports and b) the URL in for the web-view is getting merged with the updated values. Again, the console should show these values with the app running and connected.
 
CoolShaikh
I hate code!
Profile
Posts: 27
Reg: Aug 31, 2011
Edison
270
like
09/30/11 02:23 PM (14 years ago)
Thank you!!!! Figured it out.
 
birwin
Lost but trying
Profile
Posts: 93
Reg: Dec 29, 2010
location unknow...
3,080
like
09/30/11 04:44 PM (14 years ago)
I have a php script setup to capture the lat and long from my v1.5 ios app. The info inserts into a mysql database. Sometimes when a user opens the app on an older 3g iPhone in an area with little reception, I get back 0,0, values for lat and long. I used an if statement in my php script to keep the 0's out, and only update/insert the row when an actual value exists. if ($deviceLatitude != '0') { run the sql query } If the values do not equal zero, then run the insert statement etc... This only happens every now and then to me, so I added the if statement just in case.
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
09/30/11 06:48 PM (14 years ago)
@ Birwin - You rock. #JustSaying
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.