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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -