美文网首页
2024-02-19 CLLocationCoordinate2

2024-02-19 CLLocationCoordinate2

作者: zxh123456 | 来源:发表于2024-02-18 17:27 被阅读0次
    CLLocationCoordinate2D *coors =  (CLLocationCoordinate2D *)malloc(gpsDictLists.count * sizeof(CLLocationCoordinate2D));
                for (int i = 0; i < gpsDictLists.count; i++) {
                    NSDictionary *gps = gpsDictLists[i];
                    float lat = [gps[@"lat"] floatValue];
                    float lng = [gps[@"lng"] floatValue];
                    coors[i] = CLLocationCoordinate2DMake(lat,lng);
                }
                MAPolyline *polyLine = [MAPolyline polylineWithCoordinates:coors count:gpsDictLists.count];
                [self.mapView addOverlay:polyLine];
    

    相关文章

      网友评论

          本文标题:2024-02-19 CLLocationCoordinate2

          本文链接:https://www.haomeiwen.com/subject/virmadtx.html