Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing full text in Pin's label in xamarin

I want to display text in multiple lines in the pin's label when it is clicked, but when I have a very long text to be displayed in Address it shows me only a part of it and rest of it remains hidden eg: 'Street 12A...'. How can I make the label to display the whole text on clicking it and if possible then in multiple lines using Xamarin.Forms.Maps.

 var pin = new Pin
{
    Type = PinType.Place,
    Position = position,
    Label = "Label Name",

    Address = "some text..........."
};
map.Pins.Add(pin);
like image 406
A. Sinha Avatar asked Nov 09 '22 14:11

A. Sinha


1 Answers

You would be to create a custom render for map on each platform to replace the standard iOS pin annotations, Android pin markers, etc...

Xamarin has a full guide for creating custom pin annotations/markers and thus you can create the UI elements you need to display your full text.

enter image description here

Ref: https://developer.xamarin.com/guides/xamarin-forms/custom-renderer/map/

like image 94
SushiHangover Avatar answered Dec 26 '22 09:12

SushiHangover