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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -