相关疑难解决方法(0)

Google Maps iOS SDK,获取2个地点之间的路线

当我使用谷歌地图SDK时,我正试图在iOS上的两个位置之间获得驾驶方向.我知道我们可以用两种方法做到这一点: -

1.)使用URL方案,您的设备上必须安装Google Maps App.

2.)使用Directions API,通过Request-Response然后解析JSON.显示标记以显示方向.

现在,我的问题是,我可以通过其他任何方式在iOS上执行此操作吗?我需要显示从当前位置到我有Lat/Long的特定位置的方向.

我的意思是,真的不可能简单地传递2个位置作为参数和谷歌地图SDK,会给我指示吗?

谢谢,

google-maps ios google-maps-sdk-ios

29
推荐指数
6
解决办法
5万
查看次数

通过 GMSPolyline google maps ios sdk 绘制一条曲线

我想在两个标记(例如 Uber)之间画一条曲线,但没有办法做到这一点。有什么想法吗?

google-maps path polyline ios swift

6
推荐指数
0
解决办法
1378
查看次数

如何在谷歌地图(swift)中的两个标记之间绘制路线?

我想显示我制作的两个标记之间的方向。我该怎么做?如何显示方向?

这是我用来制作标记的代码:

func mapView(mapView: GMSMapView, didLongPressAtCoordinate coordinate: CLLocationCoordinate2D) {
    if counterMarker < 2
    {
        counterMarker += 1
        let marker = GMSMarker(position: coordinate)
        marker.appearAnimation = kGMSMarkerAnimationPop

        marker.map = mapView
        marker.position.latitude = coordinate.latitude
        marker.position.longitude = coordinate.longitude

        print(marker.position.latitude)
        print(marker.position.longitude)

    }
Run Code Online (Sandbox Code Playgroud)

这是用于在单击时删除标记的代码:

func mapView(mapView: GMSMapView, didTapMarker marker: GMSMarker) -> Bool {

        let alert = UIAlertController(title: "Alert", message: "Are you Sure for deleting ?!", preferredStyle: UIAlertControllerStyle.Alert)
        alert.addAction(UIAlertAction(title: "No", style: UIAlertActionStyle.Default) {
            UIAlertAction in
            NSLog("No Pressed")


            })
        alert.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.Default) {
            UIAlertAction in
            NSLog("Yes Pressed") …
Run Code Online (Sandbox Code Playgroud)

google-maps routes direction swift

3
推荐指数
1
解决办法
1万
查看次数

GoogleMaps:如何绘制虚线以连接谷歌地图ios上的方向路径起点

我在我的项目中使用谷歌地图进行方向和显示路线.我已经做了所有的事情,但是我无法绘制虚线以连接从我的位置或建筑物的起点.

查看我的应用截图截图1

现在我想绘制像google-maps截图2一样的虚线

在此输入图像描述

任何建议和意见将不胜感激

google-maps ios google-directions-api swift3

3
推荐指数
1
解决办法
1827
查看次数