1

I added MKpolyline in my map using the following code.But it is not showing the title of polyline.Please help me to show the title.Thanks in advance.

self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:2];
self.routeLine.title = @"route1";
[mapView addOverlay:self.routeLine];
Madhumitha
  • 3,794
  • 8
  • 30
  • 45
  • 1
    Unfortunately the title has to be drawn manually. See the following for ideas: http://stackoverflow.com/questions/7825220/draw-text-in-circle-overlay, http://stackoverflow.com/questions/10529217/is-there-away-to-add-text-using-paths-drawing –  Aug 14 '12 at 14:17
  • Another crude alternative might be to add a custom annotation with a UILabel near the polyline overlay. –  Aug 14 '12 at 14:32
  • Did you found any answer for this? I am struggling from so long haven't got anything working. Please help. – Anirudha Mahale Aug 20 '19 at 04:25

0 Answers0