Xamarin.Forms.GoogleMaps
Xamarin.Forms.GoogleMaps copied to clipboard
[Android] Polyline, Polygon and Circle are not drawn
VERSIONS
- Xamarin.Forms.GoogleMaps - 3.3.0
- Xamarin.Forms - 4.4.0.991265
PLATFORMS
- [x] Android
- [ ] iOS
- [ ] UWP
ACTUAL BEHAVIOR
In iOS, I can draw a line between points and on Android I cannot.
EXPECTED BEHAVIOR
In Android , Polylines, Polygons and Circles are shown when added to Map.
HOW TO REPRODUCE
- Create a map.
- Add Polyline with at least two points.
- Run in iOS , see the polyline.
- Run in Android, don't see the polyline.
var polyline1 = new Polyline();
polyline1.StrokeWidth = 10f;
polyline1.StrokeColor = Color.Red;
polyline1.Positions.Add(new Position(36.00, 139.83));
polyline1.Positions.Add(new Position(36.10, 139.93));
polyline1.Positions.Add(new Position(36.00, 140.03));
map.Polylines.Add(polyline1);
PS: Pins are shown in both platforms.

Could you try out sample apps?
https://github.com/amay077/Xamarin.Forms.GoogleMaps/tree/master/XFGoogleMapSample
I already try the sample apps , got the same problem in Android version.
BTW: the sample code that I gave is from the samples apps.
@wefbak Have you found any solution for this issue? I am having the same problem as you. I use Xamarin.Forms 4.5.0.657 and Xamarin.Forms.GoogleMaps 3.3.0
This is not working on preview version too I need to live my app tomorrow anybody has workaround for this
Downgrading to 2.3.0 solved that issue in my case. 3.0.0 and above are broken on Android.
Downgrading to 2.3.0 solved that issue in my case. 3.0.0 and above are broken on Android.
Thank you @Naxilos! Downgrading solved my issue too.
Unfortunately it's not working with the latest version, and downgrading is not an option for us, because we would have to use really old Google Services packages, and we're using other Google Services too. Could somebody somehow manage to get the polyline work on Android? The polygons are drawn correctly by the way.