相关疑难解决方法(0)

ios Google SDK Map无法创建虚线折线

我已经调用了下面的方法来绘制标记之间的虚线折线.在执行时,它表明只绘制实线.你能告诉我如何在Google Map上绘制虚线吗?

在此输入图像描述

- (void) createDashedLine:(CLLocationCoordinate2D )thisPoint:(CLLocationCoordinate2D )nextPoint:
(UIColor *)colour
{
    NSLog(@"next pt latitude %ff" , nextPoint.latitude);
    NSLog(@"next pt longitude %ff" , nextPoint.longitude);
    NSLog(@"this pt laatitude %ff" , thisPoint.latitude);
    NSLog(@"this pt longitude %ff" , thisPoint.longitude);

    double difLat = nextPoint.latitude - thisPoint.latitude;
    double difLng = nextPoint.longitude - thisPoint.longitude;
    double scale = camera.zoom * 2;
    double divLat = difLat / scale;
    double divLng = difLng / scale;
    CLLocationCoordinate2D tmpOrig= thisPoint;
    GMSMutablePath *singleLinePath = [GMSMutablePath path];

    for(int i = 0 ; i < scale …
Run Code Online (Sandbox Code Playgroud)

google-maps ios google-polyline google-maps-sdk-ios

7
推荐指数
4
解决办法
5740
查看次数