using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.GoogleMaps;

namespace DemoGoogleMapApp
{
    // Learn more about making custom code visible in the Xamarin.Forms previewer
    // by visiting https://aka.ms/xamarinforms-previewer
    [DesignTimeVisible(false)]
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
            AddMarker();
        }

        private void AddMarker()
        {
            Pin one = new Pin()
            {
                Label="Pin ONE",
                Position= new Position(48.1390196, 11.5744422)
            };

            Pin two = new Pin()
            {
                Label = "Pin Two",
                Position = new Position(48.1567724, 11.4932464)
            };

            MyMap.Pins.Add(one);
            MyMap.Pins.Add(two);

            MyMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(48.1390196, 11.5744422), Distance.FromKilometers(10)));

        }
    }
}
