Guest User

Untitled

a guest
Dec 13th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. public async Task GetDataAsync()
  2. {
  3. var DataAsync = await _todoService.GetData(doItem.id, "4000");
  4.  
  5. try
  6. {
  7. var doPin = new Pin
  8. {
  9. Type = PinType.Place,
  10. Position = new Position(lats, lons),
  11. Label = Title,
  12. };
  13.  
  14. Map.Pins.Add(doPin);
  15.  
  16. Map.PinClicked += (sender, args) =>
  17. {
  18. IsPinVisible = true;
  19.  
  20. NewAddress = Address + todoItem?.dist;
  21.  
  22. };
  23. Map.MapClicked += (sender, args) =>
  24. {
  25. IsPinVisible = false;
  26. };
  27.  
  28. foreach (var i in parkDataAsync)
  29. {
  30. var todoPin = new Pin
  31. {
  32. Type = PinType.Place,
  33. Position = new Position(i.lat, i.lon),
  34. Label = i.name
  35. };
  36.  
  37. Map.Pins.Add(todoPin);
  38.  
  39.  
  40. Map.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(eventlat, eventlon), Distance.FromKilometers(1)));
  41.  
  42. }
  43. }
  44. catch (Exception err)
  45. {
  46. Debug.WriteLine("Error: {0}", err);
  47. }
  48. }
  49.  
  50. private TodoItem _todoItem;
  51. public TodoItem todoItem
  52. {
  53. get => _todoItem;
  54. set
  55. {
  56. SetProperty(ref _todoItem, value);
  57. }
  58. }
  59.  
  60. NewAddress = Address + _parkItem?.dist;
  61.  
  62. `_parkItem?.dist`
  63.  
  64. foreach (var i in parkDataAsync)
  65.  
  66. //NewAddress = Address;// + ___parkItem.Add(parktItem.dist);// parkDataAsync.Add(parktItem.dist);
Add Comment
Please, Sign In to add comment