Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How can I change polyline color/width using Google Play Services

$
0
0

I'm having issues changing color/width of a polyline I'm creating using the Google Play Services Rev 12.

Here's a simplified code I'm using

var options = new PolylineOptions();
// at this point I can't set Color/Width, as options.Width is only a getter.
// There is InvokeWidth and InvokeColor, but those don't seem to have any effect.

foreach (var point in points)
{
  options.Add(new LatLng(point.Latitude, point.Longitude));
}

When I add the polyline options to the map I get back an instance of Polyline, which does have Width/Color setters

var polyline = map.AddPolyline(options);

polyline.Color = Resource.Color.herpderp;
polyline.Width = 3;

But it seems that this is not good enough either, as the polyline isn't responding to the change. Maybe it needs to be redrawn somehow?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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