Discussion Forums  >  Maps, Device Location, Tracking

Replies: 5    Views: 1924

AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
11/01/12 08:13 AM (11 years ago)

Google Maps URL / directions to a location from current location

Hey, I'm hoping someone can help me? I'm trying to create an app with information on locations and then an option for the user to open google maps with directions from their current location to the specified location. I have set up a html page that works fine in BT, the issue I'm having is with a HTML URL that will send the user to a google maps page with the directions (ideally, with options for driving, walking etc) The closet I can get is the following URL, neither leaving the 'saddr' blank or as 'current+location' seems to get the desired results though. Can anyone tell me what I'm doing wrong? I've spent an afternoon going round in circles on this so any help would be appreciated! https://maps.google.com/maps?saddr=&daddr=51.566108,-0.07573&sensor=TRUE Other relevant information (from research I've done already) - 'Start tracking location' in the core properties is 'on' - I'm testing on a HTC phone (i.e. not an emulator) Thanks! Adam
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/01/12 10:54 AM (11 years ago)
Not sure this will work, but try: maps://maps.google.com/maps?saddr=&daddr=51.566108,-0.07573&sensor=TRUE Mark
 
AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
like
11/02/12 11:20 AM (11 years ago)
This just comes up with a 'web page unavailable' error, thanks for the suggestion anyway! I'm not completely sure how the buzztouch pages interact with eclipse/the device I'm testing on (for instance, why when I make a change to the buzztouch dashboard does it automatically filter through to my device?), but is there some code I could enter into a 'custom URL' page that would call the map function in the same way that I would if I had just built the app from the ground up?
 
frozensun090
Aspiring developer
Profile
Posts: 25
Reg: Jan 13, 2012
location unknow...
550
like
01/12/13 11:08 PM (11 years ago)
Interesting and I'm having similar problems with my app. Maybe Mark can weigh in. You original link loads the mobile maps page in both my stock browser and Chrome, complete with current location. As a custom URL page in app, the current location does not show. Any idea why anyone? Same problem I've been having experimenting with a custom map in Google Maps. The mobile page loads in browsers and the current location button works great. When I put the same URL into a Buzztouch screen, the current location button does nothing. Is this a permission setting? To answer your one question about why changes are pushed to the device, that is because your application is an online app. Read up on Online vs. Offline apps but basically, online apps are linked to the control panel and changes are pushed to the app immediately. Offline apps do not have this linkage and require an apk update or one via the store. Depending on your needs, either one may be a better option.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/12/13 11:12 PM (11 years ago)
In the Core Settings for your app in the control panel, there is an option for enabling GPS in the app, which would then allow the current location button to do something. Make sure that's turned on. Mark
 
frozensun090
Aspiring developer
Profile
Posts: 25
Reg: Jan 13, 2012
location unknow...
550
like
01/12/13 11:17 PM (11 years ago)
Yes, it's on and the Location Map plugin shows the current phone location (though very far off when zoomed out). Location just does not work with a custom url. Sites that ask for location access in browser do not offer prompt while in app. While on the topic on the GPS setting, I have included the Allow GPS screen in settings but is there a way to show a prompt on first boot to show a GPS disclaimer or similar? I dont want it to load every time like a splash screen but more like after first run like a change log.
 

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.