Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

XF Maps polyline - codeline hits, but nothing gets drawn?

$
0
0

I'm running the sample project here: https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/maps/map-overlay/polyline/

The code hits all the place it's supposed to hit, I can see it's adding the position to PolylineOptions, and get added to the map. But nothing gets drawn in the actual map? Can anyone tell me what's wrong, is it broken?

public void OnMapReady(GoogleMap googleMap)
{
    map = googleMap;

    var polyline = new PolylineOptions();
    polyline.InvokeColor(0xA81D31);

    foreach (var pos in routeCoordinates)
    {
        polyline.Add(new LatLng(pos.Latitude, pos.Longitude));    // Hits here
    }

    map.AddPolyline(polyline);    // And also hits here...
}

I'm running on Android simulator. The Nuget package has been updated, both Xamarin.Forms and Xamarin.Forms.Maps is running on v2.3.3.180.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>