amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 346 forks source link

[Android] Polyline, Polygon and Circle are not drawn #688

Open wefbak opened 4 years ago

wefbak commented 4 years ago

VERSIONS

PLATFORMS

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

  1. Create a map.
  2. Add Polyline with at least two points.
  3. Run in iOS , see the polyline.
  4. 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.

amay077 commented 4 years ago

Screenshot_1579013538

Could you try out sample apps?

https://github.com/amay077/Xamarin.Forms.GoogleMaps/tree/master/XFGoogleMapSample

wefbak commented 4 years ago

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.

florin-nitulescu commented 3 years ago

@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

sarthak1995-26 commented 3 years ago

This is not working on preview version too I need to live my app tomorrow anybody has workaround for this

Naxilos commented 3 years ago

Downgrading to 2.3.0 solved that issue in my case. 3.0.0 and above are broken on Android.

florin-nitulescu commented 3 years ago

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.

tamasszadvari commented 1 year ago

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.