Discussion Forums  >  Uncategorized

Replies: 4    Views: 371

tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
07/02/11 08:00 AM (14 years ago)

Show Walking Directions

I'm working on a tour app. Seems like the default option is to show driving directions. Since my people are doing walking tours, can the app be hard coded to show walking directions as the default?
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
07/02/11 08:30 AM (14 years ago)
I'm sure you could, but you would have to mess around with how whatever map application 'draws' the route. I'm thinking for an easier solution you could try: having a location map show the location of the start of your walking tour. Then when the user presses on the information button on the map pin, it could open up another page. In this page you could have a map image that you have taken into photoshop and drawn in the walking route. Just an idea. Maybe someone else has a better one?
 
tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
like
07/02/11 08:41 AM (14 years ago)
Yes, that can work. I'm using the map location which pulls from google maps. I can see creating my own maps. At this point I don't want to guide them. I'm adding pinpoints so they and make up their own mind where to go. This is my gateway app. I'm only giving them the street address or location with no info. I'm going to create another version, my upsell, with directions and more informaiton about the location. The upsell app will cost $1.99 or something like that.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/03/11 02:14 AM (14 years ago)
This may or may not work...give it a try? In the BT_Screens folder, find BT_screen_map.m. Open this file. On about line 745 you'll see: NSString *urlString = [NSString stringWithFormat:@'http://maps.google.com/maps?saddr=%@,%@&daddr=%@,%@', fromLat, fromLon, toLat, toLon]; That line of code builds the URL that the native maps app reads when it launches. It includes the start and ending locations. After reviewing all the Google Map Parameters here: http://mapki.com/wiki/Google_Map_Parameters I found a 'route type flag' Adding a route type for walking directions may help. This is added to the URL. The paramater for walking directions is dirflg=w This may or may not work in iOS but it does work in Google Maps on the web. Append that to the URL after the ? and before the saddr like this: NSString *urlString = [NSString stringWithFormat:@'http://maps.google.com/maps?dirflg=w&saddr=%@,%@&daddr=%@,%@', fromLat, fromLon, toLat, toLon]; (note that I added it after the ? and before the saddr. An additional & was also added. NSString *urlString = [NSString stringWithFormat:@http://maps.google.com/maps?dirflg=w&saddr=%@,%@&daddr=%@,%@, fromLat, fromLon, toLat, toLon];
 
tiger
Aspiring developer
Profile
Posts: 121
Reg: Dec 26, 2010
USA
1,210
like
07/04/11 08:00 PM (14 years ago)
Hi David, I tried the above instructions. I'm still getting driving directions first. I'll keep testing.
 

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.