ios - How to open google maps app with a dropped pin ? - Swift -


i have code open google maps app specific location , it's working need drop pin on location, possible ?

if (uiapplication.shared.canopenurl(url(string:"comgooglemaps://")!)) {                  uiapplication.shared.openurl(url(string:                     "comgooglemaps://?center=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)&zoom=14&views=traffic")!)             } else {                 print("can't use comgooglemaps://");             } 

how to ?

try this

if (uiapplication.shared.canopenurl(url(string:"comgooglemaps://")!)) {          uiapplication.shared.openurl(url(string:             "comgooglemaps://?center=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)&zoom=14&views=traffic&q=\(self.location.coordinate.latitude),\(self.location.coordinate.longitude)")!)     } else {         print("can't use comgooglemaps://");     } } 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -