View Full Version : map problem if I toucj "terms and conditions"

10 Feb 2011, 7:31 AM
Hi to all,
by chance ... I touch on a link Terms and condition in a map object in a iPhone application ...

After showing the information ... isn't possible to return on a application ...

How can open this link on a Safari instead of the application?

this is my map:

map = new Ext.Map({
useCurrentLocation: false,
mapOptions: {
scaleControl: false,
streetViewControl: true,
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR}, // HORIZONTAL_BAR DROPDOWN_MENU DEFAULT
navigationControl: false,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, // SMALL ZOOM_PAN ANDROID DEFAULT
center: new google.maps.LatLng(filterSelections.currLat,filterSelections.currLon),
mapTypeId: google.maps.MapTypeId.ROADMAP, // SATELLITE ...
zoom: 17

10 Feb 2011, 8:33 AM

11 Feb 2011, 12:48 AM
I understand the problem ...

If I put any link in other tab like: <a href="www.google.com">google</a>
when a click on a link I go to the google home page and I can't return into my app ...

How can force to open link in Safari?

I'm using PhoneGap + Sencha Touch

Thanks to all

Riddler ?

11 Feb 2011, 6:44 AM
If you want to do this ... you have to modify tha AppDelegate.m file =P~
with this code:

- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

NSURL *url = [request URL];

// add any other schemes you want to support, or perform additional
// tests on the url before deciding what to do -jm

if( [[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"])
[[UIApplication sharedApplication] openURL:url];
return NO;
return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ];


... and NOW ... your link open and wieving with Safari :))

I hope this can be helpful to someone else ..

Riddler ?