Xamarin.Forms.GoogleMaps icon indicating copy to clipboard operation
Xamarin.Forms.GoogleMaps copied to clipboard

[Android] Polyline, Polygon and Circle are not drawn

Open wefbak opened this issue 5 years ago • 7 comments

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

  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.

wefbak avatar Jan 09 '20 13:01 wefbak

Screenshot_1579013538

Could you try out sample apps?

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

amay077 avatar Jan 14 '20 14:01 amay077

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 avatar Jan 15 '20 10:01 wefbak

@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

florin-nitulescu avatar Sep 08 '20 03:09 florin-nitulescu

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

sarthak1995-26 avatar Dec 04 '20 11:12 sarthak1995-26

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

Naxilos avatar Jul 19 '21 10:07 Naxilos

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.

florin-nitulescu avatar Jul 19 '21 11:07 florin-nitulescu

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.

tamasszadvari avatar Dec 02 '22 12:12 tamasszadvari