I am building an iOS app using Rubymotion. I am trying to draw a line (path) on a map using coordinates. I can run it in my app but I see no lines on the map (and no errors either).
@mapview = MKMapView.alloc.initWithFrame(view.bounds)
@mapview.mapType = MKMapTypeStandard
@mapview.delegate = self
@mapview.showsUserLocation = true
@mapview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
view.addSubview(@mapview)
Then I try to draw the line
path = [CLLocationCoordinate2D.new(41.878114,-87.629798), CLLocationCoordinate2D.new(41.865947,-87.622576)]
pointers = Pointer.new(CLLocationCoordinate2D.type, path.length)
pointers[0] = path[0]
pointers[1] = path[1]
polyLine = MKPolyline.polylineWithCoordinates(pointers, count:2)
@mapview.addOverlay(polyLine)