Tag: 谷歌地图

如何使用当前位置调用iPhone地图作为起始地址

我知道可以通过在带有位置string或纬度/ daddr参数saddr和daddr的谷歌地图URL(参见下面的示例)上调用openURL来启动iPhone地图应用程序。 但是我想知道是否可以使起始地址成为“当前位置”地图书签,以便我可以使用地图应用程序的位置处理代码。 我的谷歌search一直没有结果。 例如: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@", myLatLong, latlong]]]; 除了调用当前位置书签来代替myLatLong 。

CLLocationManager委托方法没有被调用(谷歌地图是集成的)

CLLocationManager的委托方法 didChangeAuthorizationStatus和didUpdateToLocation 没有被调用。 位置始终使用说明密钥已添加到info.plist中,并在第一次启动应用程序时收到通知。 我能够看到谷歌地图,但我无法看到当前的位置,当我改变位置,它没有得到更新。 Basicaaly委托方法没有被调用。 //码 import UIKit import GoogleMaps class ViewController: UIViewController,GMSMapViewDelegate { @IBOutlet weak var mapViewTest: GMSMapView! let locationManager = CLLocationManager() var currentLocation :CLLocation = CLLocation(latitude: 0.0, longitude: 0.0) var currentLatitude : Double = 0.0 var currentLongitude : Double = 0.0 override func viewDidLoad() { super.viewDidLoad()“ locationManager.delegate = self if (CLLocationManager.locationServicesEnabled()) { […]

GoogleMaps基本的iOS演示程序崩溃 – 无法识别的select器发送到实例

我试图运行基本的iOS演示SDK代码。 我已经创build了API密钥,并且可以正常加载。 虽然我已经将代码从viewDidLoad转移到loadView,但效果依然存在。 看下面的代码 -(void)loadView{ // Create a GMSCameraPosition that tells the map to display the // coordinate -33.86,151.20 at zoom level 6. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; _mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; _mapView.myLocationEnabled = YES; self.view = _mapView; // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker […]

我如何从我的原生应用程序中启动Google Maps iPhone应用程序?

Apple开发者文档 (现在链接已经失效)解释说,如果您在网页中放置链接,然后在iPhone上使用Mobile Safari时单击该链接,则会启动与iPhone一样提供的Google地图应用程序。 我如何才能在自己的本地iPhone应用程序(即不通过Mobile Safari的网页)中启动具有特定地址的Google Maps应用程序,方法与点击联系人中地址启动地图的方式相同? 注意:这只适用于本设备。 不在模拟器中。

在iOS中的GMSMapView上绘制两个地方之间的路线

我正在开发一个iOS应用程序。 在那个应用程序中,我有2个字段从和。 我使用Google自动完成APIinput地址,同时我也能够获取2个位置的经度和纬度 ,并且能够在GMSMapView上显示标记。 现在我想在这两个地方之间画出路线。 当我们使用MKMapView时,我find了一个解决scheme。 但我无法findGMSMapView的解决scheme。 请帮我在GMSMapView绘制这两个点之间的路线。 如果可能的话请给我一些重要的链接。 谢谢。