Discussion Forums  >  Maps, Device Location, Tracking

Replies: 4    Views: 85

patchmonkey
Android Fan
Profile
Posts: 8
Reg: Aug 29, 2012
Morristown
2,330
08/30/12 11:01 PM (13 years ago)

CustomURL Not Permitting Location Lookup

Hi - I have screen that loads the CustomURL http://www.opendining.net/mobile/app/503c380645b2bee5220000a4. It has a "Find My Location" button on it that works when loaded in the browser but not through the BuzzTouch generated application. How do I get myself around this? It seems like this has happened before to others but the closest I found was a gentleman who left Buzztouch for PhoneGap/Cordova.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/31/12 12:21 AM (13 years ago)
Do you have GPS turned on for your app so that it can grab the current location? It's located in the Core Properties section of your control panel. And of course you'll need to be running it on an actual device and not a simulator. Was looking at the code for the page, and looks like the relevant part is this, in case you're good at JS: $('#use-geolocation').live('click', function() { var redirect = $(this).closest('.ui-content').attr('data-redirect-to'); if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { doSearch(position.coords.latitude, position.coords.longitude, redirect); }, function() { /* TODO: Something on error? */ }); } }); Can't believe anybody would leave buzztouch for PhoneGap! That's like trading in a Porsche for my beat up van! Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
08/31/12 03:57 AM (13 years ago)
Funny. Some 18 months into my App development learning curve, Phonegap has gone from baffling to awesome, while BT has gone from awesome super simple (v1.4) to almost baffling (plugin creation)..
 
patchmonkey
Android Fan
Profile
Posts: 8
Reg: Aug 29, 2012
Morristown
2,330
like
08/31/12 08:25 AM (13 years ago)
Mark - I'm actually doing my testing on a Galaxy Nexus. I do have the GPS turned on the application under core properties. Does not appear to allow GPS through or pass the data under. Works on a mobile browser, though?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/31/12 11:04 AM (13 years ago)
I'm sure your location coordinates are available to the app, they're just not being called correctly by the Javascript. Here's a tutorial I wrote up a while back on grabbing the location and putting it in a database. I use PHP in the example, but if you know enough about JS, and the code for your page, you might be able to figure this thing out: http://www.buzztouch.com/forum/thread.php?tid=6A0E0F30B5413FF704B3A04 Mark
 

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.