찾다

 >  Q&A  >  본문

ios - 关于高德开发平台的划线功能

想实现在地图上划线的功能,于是按照api手册写了以下代码:

NSLog(@"划线");
MAMapPoint *arrayPoint = malloc(sizeof(MAMapPoint) * 2);
arrayPoint[0] = MAMapPointMake(38.7f, 117.48f);
arrayPoint[1] = MAMapPointMake(50.6f, 117.48f);
MAPolyline *line = [MAPolyline polylineWithPoints:arrayPoint count:2];
[self.mapView addOverlay: line];
free(arrayPoint);

但是地图上不显示根据这两个点所化的直线。请问这是什么原因?

PHP中文网PHP中文网2887일 전335

모든 응답(1)나는 대답할 것이다

  • ringa_lee

    ringa_lee2017-04-17 17:32:30

    오버레이 프록시를 구현해야 할까요?

    회신하다
    0
  • 취소회신하다