recherche

Maison  >  Questions et réponses  >  le corps du texte

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 Il y a quelques jours333

répondre à tous(1)je répondrai

  • ringa_lee

    ringa_lee2017-04-17 17:32:30

    Devrions-nous implémenter un proxy superposé ?

    répondre
    0
  • Annulerrépondre