Discussion Forums  >  Uncategorized

Replies: 2    Views: 533

GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
07/17/11 01:43 PM (14 years ago)

How Do I Use loadScreenObject

Hi, I am having a bit of trouble understanding how to use the loadScreenObject parameter. In one of my projects, I have a location map that shows multiple fishing locations. I get the locations from a text file, and it is currently configured like this : {childItems:[ {itemId:urban001, itemType:BT_mapLocation, latitude:32.28481069238481, longitude:-111.03731632232666, title:Silverbell Lake, subTitle:4600 N Silverbell Rd, Tucson, loadScreenObject:BT_screen_customHTML, transitionType:flip} ]} What I would like to happen is when the user taps on the call-out bubble, the screen flips and shows information about that particular location. I'm thinking using a customHTML screen would be the best thing in that scenario. My thought is that I don't have to create a new screen for each location, but could create a generic screen that would be created with different parameters, based on the location being tapped. Is this at all possible? Can I make reference, as I did above, to a general BT_screen_customHTML screen and then pass it parameters (info, title, etc) based on the location? Or, do I need to create a new screen in buzztouch for each location, and reference via loadScreenWithItemId or loadScreenWithNickname? If I am able to do what I'm proposing, how do I integrate that information into my locations text file, or does it have to be somewhere separate? Thanks! Mark
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/18/11 02:46 AM (14 years ago)
Lots of answers. In short, you can totally do what you're describing. Most folks call this dynamic locations and it's very popular. Like you say, most things on map are similiar (like fishing holes, movie theatres, food joints, etc) So, tapping one thing on the map loads the details page for that thing. If you have not seen this yet, it's worth reading: http://www.buzztouch.com/forum/thread.php?tid=65181E4ADF97874B08E6D2B You'll need to look at the sample output in one of the files mentioned in this discussion. It's all about dynamic locaitons and what happens when an item is tapped. There are also some good examples in the documentation under 'Right Nav Button' I think. It's a matter of you understanding how to make a valid screen object like: {itemId:1, itemType:BT_screen_webView, backgroundColor:#dffdfd, dataURL:http://www.mysite.com/myfishinghole.php?id=1} Then inserting that object as the loadScreenObject. You'll see some good examples in the docs.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/18/11 10:51 PM (14 years ago)
This is excellent information...thanks, David! What was confusing me was how to specify the child object within a child object, and I understand that now from the example. I'll play around with things a bit, and let you know how it goes!
 

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.