using Billing.Models; using Billing.UI; using Xamarin.Forms.Maps; namespace Billing.Views { public partial class ViewLocationPage : BillingPage { //private readonly Bill bill; public ViewLocationPage(Bill bill) { //this.bill = bill; Title = bill.Name; InitializeComponent(); if (bill.Latitude != null && bill.Longitude != null) { var address = $"({bill.Latitude}, {bill.Longitude})"; map.Pins.Add(new Pin { Label = string.IsNullOrEmpty(bill.Store) ? address : bill.Store, Type = PinType.Generic, Position = new Position(bill.Latitude.Value, bill.Longitude.Value), Address = address }); } } } }