Hey,
I would like to check if there are any capabilities in shared code to add map overlays (not just pins) but also custom shapes polygon etc...
Also Why is the Pin Clicked is not working? i see the pin.Clicked in assembly but never works?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace Geo.Student
{
public partial class Map : ContentPage
{
public Map()
{
InitializeComponent();
MyMap.MoveToRegion(
MapSpan.FromCenterAndRadius(
new Position(37, -122), Distance.FromMiles(1)));
var position = new Position(37, -122); // Latitude, Longitude
var pin = new Pin
{
Type = PinType.Place,
Position = position,
Label = "custom pin",
Address = "custom detail info"
};
pin.Clicked += (sender, args) => DisplayAlert("Tapped!", "Pin was tapped.", "OK");
MyMap.Pins.Add(pin);
}
}
}