private void AddPolyline(MapPolyline polyline) { // add the new one using (var op = CreatePolylineOptions(polyline)) { foreach (var pt in polyline.Positions) { op.Add(pt); } // add the last polyline segment var line = PolylineAdv.Add(NativeMap, op); _polylines.Add(polyline, line); } }
public static PolylineAdv Add(GoogleMap map, PolylineOptions op) { var polyline = new PolylineAdv(map, op); var idxStart = 0; while (idxStart < op.Points.Count) { using (var options = CloneOptions(op)) { for (var i = idxStart; i < Math.Min(idxStart + PolylineSegmentLength + 1, op.Points.Count); i++) { options.Add(op.Points[i]); } polyline._polylines.Add(map.AddPolyline(options)); } idxStart += PolylineSegmentLength; } return polyline; }
public static PolylineAdv Add(GoogleMap map, PolylineOptions op) { var polyline = new PolylineAdv(map, op); var idxStart = 0; while (idxStart < op.Points.Count) { using (var options = CloneOptions(op)) { for (var i = idxStart; i < Math.Min(idxStart + PolylineSegmentLength + 1, op.Points.Count); i++) { options.Add(op.Points[i]); } polyline._polylines.Add(map.AddPolyline(options)); } idxStart += PolylineSegmentLength; } return(polyline); }