Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 13    Views: 117

Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
06/02/14 10:03 AM (9 years ago)

Modifying the Infowindow Produced by Tapping the Map Pin

I learned enough from another thread about modifying the JSON code in Location Map to be curious! Now - when I tap on a Pin on my Map, a white infowindow (to use a term I work with, with Google Maps) pops up, with the "title" and "subtitle", and an "i" in a circle. I'd like to add a third line of text, "Provide Feedback", to open a new screen with several menu items pertaining to the specific location the Pin referred to. I know how to build that new menu screen - but not how to add the "Provide Feedback" to the code that makes the Pin and the infowindow. { "itemId":"SCo2Ci3Ca1L0", "itemType":"BT_mapLocation", "latitude":"53.4053300", "longitude":"-2.9754800", "title":"Britainia Adelphi", "subTitle":"Britainia Adelphi Hotel, Liverpool, UK", "loadScreenWithItemId":"showDirections" *****Click Here to Provide Feedback - opens new screen },
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/02/14 10:07 AM (9 years ago)
SmugWimp started to address this in https://www.buzztouch.com/forum/thread.php?tid=94192369636FA24EC5A69A5 But I would like to build upon his response, and pursue it further here.
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/02/14 05:13 PM (9 years ago)
Right now, when you tap the I in a Circle, a Modal Screen slides up from the bottom, asking if you want to open the native maps application. Then a row for OK and a row for Cancel. Seems to me, that that Modal screen could be expanded upon, and add additional menu items that I want to do.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/02/14 06:17 PM (9 years ago)
Bt_screen_map class file is where it looks it could be done.showDrivingDirections and actionSheet methods will give you ideas of how to modify it.The "Modal" screen is called an action sheet.
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/02/14 06:20 PM (9 years ago)
I'll look further after the sun goes down. Bt_screen_map. There are also files with "m"s and "h"s. Do I look in those, too? In PHP/Javascript for web we call them Modal screens. So many sites use them these days, the minute their page loads, a Modal comes up wanting you to subscribe e-mail or junk.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/02/14 06:28 PM (9 years ago)
any file with ".m" extension is a class file.files with ".h" extensions are the header files.if you know php and javascript, learning to work with xcode and objective c will be pretty easy and you'll have it down in a couple of weeks.theres lots of people on here that have joined, never coded and there life, and taught me new things.
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/03/14 08:51 AM (9 years ago)
"The UIActionSheet class of the Apple iOS can be used to present to user a modal view with a descriptive text and some buttons the user can choose from. An action sheet displays a set of choices related to a task the user initiates." Yeah! Terms are related. This is something new to learn about! I found the modal: //remember the location to drive to [self setDriveToLocation:theLocation]; //we tapped a location bubble, save it as the driveToLocation for action sheet UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"routeDrivingDirections", "Do you want to open the native maps application to route directions?") delegate:self cancelButtonTitle:NSLocalizedString(@"cancel", "Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"ok", "OK"), nil]; [actionSheet setActionSheetStyle:UIActionSheetStyleBlackOpaque]; Now I get to experiment with adding my new menu options, and then doing something with each as tapped. Will be looking for alternates to my writing this myself, as I really should be getting back to improving my data for my Maps. I am concerned as to how many members who frequent the Forum know ObjC, and how many who know ObjC frequent the Forum.
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/03/14 10:59 AM (9 years ago)
I did just install Xcode 6 beta. On the promise of a more visual experience. https://developer.apple.com/xcode/ First Build failed, because of that stupid Build Architecture problem. It wants armv7 armv7s, but the package comes with 6 something which I always have to delete and replace with armv7 armv7s. Sometimes in 3-4 places, this time in just 1 place. That should be corrected in the Control Panel. So far, it only found a trivial error... "Attempting to badge the application icon but haven't received permission from the user to badge the application".
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/03/14 11:10 AM (9 years ago)
I cant think of it off the top of my head,but searching the forums,appcoda.com, raywenderlich.com. That comes with beta products.I noticed it with xcode 5.1.1 but xcode automatically fixes it for me.The new buzztouch will be better from what ive heard.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/03/14 09:30 PM (9 years ago)
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/03/14 09:33 PM (9 years ago)
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/03/14 09:38 PM (9 years ago)
ObjC is a big language, and I'm jumping in the middle of someone else's fine work. I need to: * add to the "menu", and * I need actions to result. I'm trying to read David's code BT_screen_map.m, but I would like a human interpretation of how the menu items and the action items exist in that script. I would like to add 2-3 more action items: * Send e-mail regarding the "theLocation". * Take and post a photo from the "theLocation". The "Flickr" idea is intriguing, but I think I need someone with experience with that to explain further. Saving the photo with the "theLocation" - or place name, city, state - intact is important. Having a 3rd Party photo host is one thing, but what happens when they go away?
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/03/14 09:54 PM (9 years ago)
You can use niraj link above to direct the click of the button to the email plugin.Have one email screen to send the photo and one to send email regarding the location. Just sign up for an account on flickr.create an flickr app in your account.then get your flickr email.use that email as a default email in email photo screen. Make another email plugin screen and leave the default email blank so they can send it to themselves. oh yeah Jake Chasan has an action sheet plugin that could come in handy for this too.I havent used it but it looks awesome. go to plugin page, command + f,enter "action sheet". use a ios image gallery plugin and on the dataurl, use the flickr url. absentia has touched on this.search his name in advanced search of the forum in "created by field".or really just search "flickr" in title or topic of forum havent really looked through the location plugin that much but I think its the same as the link.you just add buttons using otherButtonsTitle statement, then use the method with the switch statements to act on what button was clicked. instead of : self.rateLabel.text = @"You've rated 3 stars."; you would put the code that opens the screens.those are just ideas.im interested in this too but super tired.if i get to it before you ill let you know *also search through the buzztouch forums.these ideas have been touched on alot.you can also google search the bt forum.
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/03/14 09:55 PM (9 years ago)
initWithTitle:NSLocalizedString(@"routeDrivingDirections", "Do you want to open the native maps application to route directions?") delegate:self cancelButtonTitle:NSLocalizedString(@"cancel", "Cancel") destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"ok", "OK"), nil]; On the App screen, "OK" comes before "Cancel". Therefore, I don't have a clue as to what the order of the three lines above, has to do with the order of the items displayed on the App. I want to add two more lines, OR 2 items on one line. Do I do "initWithTitle" for each new line? My English language training suggests that you only "init" someone ONCE per page.
 

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.