Forum Xamarin.Forms

Map pin label and address show options

I have a map in a stackLayout. My app displays the map correctly, including the pin based on coordinates (lat, lon). However, labels configured for the pin don't appear (label and address). Only when I press the pin, the labels appear.
Is there any way for display automatically the label and address when the map appears?

This is my code:

Map myMap = new Map(
                    new Position(Latitud, Longitud), Distance.FromMiles(0.3)))
                IsShowingUser = false,
                IsEnabled = true,
                IsVisible = true,
                HasZoomEnabled = true,
                HeightRequest = 350,
                MapType = Xamarin.Forms.Maps.MapType.Street,
                VerticalOptions = LayoutOptions.FillAndExpand

            var position = new Position(Latitud, Longitud); // Latitude, Longitude
            var pinMapa = new Pin
                Type = PinType.Place,
                Position = position,
                Label = "Mi Bici",
                Address = "Ubicación actual"

Best Answer


  • ChaseFlorellChaseFlorell CAInsider, University mod

    You will have to extend the MapRenderer on each platform so that you can trigger the Show/Hide of a callout from your PCL View. This is not a trivial task if you've never worked with custom renderers before.

  • GustavoBarbozaGustavoBarboza COMember ✭✭

    Thanks, @ChaseFlorell
    Is there any ways to solve without renderer?

Sign In or Register to comment.