Discussion Forums  >  Uncategorized

Replies: 2    Views: 215

Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
11/20/11 10:51 AM (14 years ago)

Can I give options to clicking on a map pin?

I think I know the answer already, but figured I'd ask just in case someone found a workaround. If I put some pins on a map, Buzztouch gives me the choice of sending the user to a specific buzztouch page, or route. I was wondering if I could do both. i.e. when a user clicked on the info button for a flag, it would send them to a page perhaps with some further info about the location, and give them a button at the bottom allowing them to route to the location. Here's my potential work around, and if someone could help me over the last hurdle, it will be do-able.... I could make the choice in buzztouch to send the user to a buzztouch page. I would make that page a list menu. On that list menu, I would use a header image that I would create in photoshop that contains all the additional info I want about the location (text and pictures, etc). I would make that header big enough to cover most of the screen minus enough room for one menu row (I've done this in other apps and it looks good.) Then for that single row on the menu, I would link it to the routing instructions. Thats the only part thats missing. Could I put some code in the bt_config that would make that one menu choice do the same function that the map screen would have done if I choose the routing option. I hope that all makes sense.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
11/20/11 10:55 AM (14 years ago)
after looking at my bt_config data, it looks like BT calls this when you ask for directions: loadScreenWithItemId:showDirections could I manually add that line to a childitem of a list menu? Would it remember what the coordinates of the last clicked menu pin was?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/20/11 11:40 PM (14 years ago)
There are tons of ways to do this, the complexity is far ranging. The best approach will depend on how many locations, screens, etc. If you're creating screens dynamically it gets even more tricky (but super flexible). Can you just create a new map to link to your menu (the menu with the big header image and the one choice). The one choice could lead to the new map with one location. That map could have the driving directions icon in the call-out bubble. You could connect your menu item to whatever method you want but you'll need to understand how it works. The menu-list options are designed to load another screen. If you don't want to load another screen you'll need to create your own Objective C class file (or .java activity) to use for the menu. That's the idea behind the Custom Plugin screen type. Create a new class file (probably a copy of an existing screen type, like a menu), rename the class (the file name and the class name in the file itself), then 'point to it.' Next, you can change / modify / customize the code in your new class without affecting the other screen types. Hard to know how difficult this is without knowing more about your level of understanding. I've seen folks pull this off without much trouble. And, I've seen folks spend days trying only to end up frustrated because they bit-off more than they could chew. How about this: a) Copy the menu list class (android it's BT_screen_menuList.java, iOS is BT_screen_menuList.h and .m). Rename the file(s) 'myMenu.h, .m' or 'myMemu.java' b) Change the name of the class name in the actual code in these files. At this point you have a new UIViewController or a new Android Activity named myMenu and a class name in the myMenu file named myMenu. If youre' using Android, add the myMenu activity to the list of allowed activities in the AndroidManifest.xml file. You'll see the long list of activities near the end of this file. Add yours to the list. c) In your v1.5 control panel, create a Custom Plugin screen. Use myMenu as the class name. You're telling the app to load your custom UIViewController or Android Activity. d) Connect this new screen to a button or menu item. At this point your myMenu screen should load but will not have any rows. You'll need to manually create the rows and the header image in code.
 

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.