How to launch Google Maps on iPhone via web link?

How to launch Google Maps on iPhone via web link?

Content Index :

How to launch Google Maps on iPhone via web link?
Tag : iphone , By : user104292
Date : November 29 2020, 01:01 AM

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Launch Google maps app from iPhone application.

Tag : ios , By : unfool
Date : March 29 2020, 07:55 AM
may help you . This is the code I use in one of my apps and it works fine with 3.1. The parameters for Google maps are documented here.
CLLocationCoordinate2D stationLocation = ...

NSString *urlString = [[NSString alloc]

NSURL *aURL = [NSURL URLWithString:urlString];
[urlString release];
[[UIApplication sharedApplication] openURL:aURL]; 

Iphone: how to launch a route in google maps api from your application

Tag : iphone , By : user186876
Date : March 29 2020, 07:55 AM
hop of those help? I have read a lot of topics, but i don't find when i want , Try this
    UIApplication *app = [UIApplication sharedApplication];

    NSURL *url = [[NSURL alloc] initWithString: @"http://maps.google.com/maps?saddr=41.029598,28.972985&daddr=41.033586,28.984546"];

    [app openURL:url];

    [url release];

Tag : swift , By : lili
Date : March 29 2020, 07:55 AM
seems to work fine I've just tried your second approach (with addingPercentEncoding(withAllowedCharacters:) and provided the given coordinate and got exactly the same error in Google Maps app.
But then I changed coordinate to the one that is in my city and voila! it worked. Seems like google maps simply couldn't generate directions given the (-20.021999, 57.579075) pair. And judging by your second screenshot (with web version presented – it is blank, no map is presented) I think it's struggling with generating directions in your case too. Why does it tell that the link is not supported in such case puzzles me though.
import UIKit

class ViewController: UIViewController {
  override func loadView() {
    let lat = 51.150992
    let long = 71.426444
    let string = "https://www.google.com/maps/dir/?api=1&destination=\(lat),\(long)"
    let encoded = string.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
    let url = URL(string: encoded)!

Tag : iphone , By : Tom D
Date : March 29 2020, 07:55 AM

Tag : ios , By : Gilmar Souza Jr.
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • Pushing mail from postfix to iPhone
  • UISegmentedControl tint color on touch
  • button inside table view cell shows highlighted state on tapping on cell
  • best practice to obtain time zone for iPhone vs iPod Touch
  • UITableViewCellStyleDefault image size
  • How to copy a wchar_t into an NSString?
  • Custom size app screen on iPad
  • Interface Builder Does Not Recognize Toolbar Buttons
  • Where can I download iPhone SDK 3.1?
  • iPhone, memory / autorelease objects
  • iPhone App too large for SpringBoard to launch?
  • NSDateFormatter only works on simulator?
  • How to get tabs like zipcar app?
  • What is the iPhone simulator IP address?
  • From a 3D modeler to an iPhone app - what are best practices?
  • How to produce an iphone app which calculates the battery status?
  • UIView animation -- horizontal page curl... like a book?
  • How to ensure YouTube API only returns videos that are streamable on iPhone?
  • CABasicAnimation delegate for animationDidStop?
  • How to test if a web service is available
  • iphone app crash, crash log posted
  • Quartz 2D or OpenGL ES? Pros and cons in the long term, possibility of migration to other platforms
  • How do I get Core Data to create an SQLite DB from my Managed Object Model
  • Can a method return an NSRange?
  • Switching xib's in iPhone SDK?
  • iPhone: value of selectedIndex for tab should be consistent, but isn't
  • how to send MMS from the iphone by programming?
  • Is it a good idea to use ASIHTTPRequest library with three20?
  • Auto launch the video player in Android from the browser like an iPhone does
  • Subview Doesnt AutoSize When Added to Root View Controller
  • How to implement UITableView with multiple columns and sideways scrolling
  • How to run/port MongoDB on iPad?
  • How to insure MFMailComposeViewController doesnt send email when body is not empty?
  • How to add ANY language in app description on AppStore? Tremendous impact on downloads!
  • Play multiple audio files using AVAudioPlayer
  • Infinite loop when adding CATiledLayer to UIView
  • How can I detect if an iPhone OS device has a proximity sensor?
  • setNeedsDisplayInRect: paints a white rectangle only
  • iPhone in App purchase : Working but Not
  • How do I debug production push notifications using Xcode?
  • Possible to play a sound without stopping music?
  • XML Processing on iPhone: What is the best option?
  • iphone Json POST request to Django server creates QueryDict within QueryDict
  • How do I make a UIAlertView appear only once, at the first start-up of an iPhone app?
  • invoking iphone address book within another application?
  • Draw triangle iphone
  • Changing font size of tabbaritem
  • Dynamically add a new row as Add in UITableView in edit mode?
  • Play an audio file using RemoteIO and Audio Unit
  • Can I change the Bundle Identifier in my app after it's been approved?
  • MKMap Annotations when clicked show a View controller instead of Popup box
  • iPhone - possible to not show keyboard but still show the cursor in a UITextField?
  • Disabling Magnifying Glass in UITextView in an iPhone App
  • Lazy load pages in UIScrollView
  • How to save a png image to camera roll?
  • how to display CFStringType? Like kABHomeLabel
  • how can i load a display in tableview header section iphone?
  • iPhone native app + integrate payment / purchase to buy products
  • How can I do metering/average peak power level in OpenAL?
  • IPhone and Android website design
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com