Forum General

Maps on Xamarin

TalissimoTalissimo Member ✭✭

Hello everyone ! I hope you are well today !

I'm trying to do a test with this library to display lines (frames) between 2 points, but I can't do it ... An error related to the package map that I have yet...

[https://github.com/amay077/Xamarin.Forms.GoogleMaps/wiki/Comparison-with-Xamarin.Forms.Maps#selected_pin_changed]using

With this code:

public void insert_Polyline()
{
var polyline = new Polyline( );
polyline.Positions.Add(new Tram(40.77d, -73.93d));
polyline.Positions.Add(new Tram(40.81d, -73.91d));
polyline.Positions.Add(new Tram(40.83d, -73.87d));

    polyline.StrokeColor = Color.Blue;
    polyline.StrokeWidth = 5f;
    polyline.Tag = "POLYLINE"; // Can set any object

    polyline.IsClickable = true;
    polyline.Clicked += (s, e) =>
    {
        // handle click polyline
    };

    map.Polylines.Add(polyline);
}

Xamarin.Forms.GoogleMaps;
using static Xamarin.Forms.GoogleMaps.Map;

Thanks for time ^^

Tagged:
Sign In or Register to comment.