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 347 forks source link

Circle Border not working on Android (works fine on iOS) #757

Open PaoloLeva opened 3 years ago

PaoloLeva commented 3 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

I have a simple code to display a map with a circle in it in the code behind:

            Position position = new Position(36.9628066, -122.0194722);
            MapSpan mapSpan = new MapSpan(position, 0.1, 0.1);
            Map.MoveToRegion(mapSpan);
            circle = new Circle();
            circle.IsClickable = true;
            circle.Center = position;
            circle.Radius = Distance.FromMeters(1000f);
            circle.StrokeColor = Color.FromHex("#88FF0000");
            circle.StrokeWidth = 8;
            circle.FillColor = Color.FromHex("#88FFC0CB");
            Map.Circles.Add(circle);

This display a circle with a border on iOS, but a circle without a border on Android (tested on Android 9, 10, 11 with the emulator)

ACTUAL SCREENSHOTS/STACKTRACE

iOS Simulator Screen Shot - iPhone 12 mini Andoid Emulator screenshot . Android 9

I tried all I can but I can't get the border on Android and that's a big issue for me.

EXPECTED BEHAVIOR

On the Android I would expect to get a circle with a border as the iOS version in the screenshot above.

HOW TO REPRODUCE

The sample app shows the border but it uses a very old version of Xamarin.Forms (still 3.x), I tried to update all packages but I only get errors.

Create a view including:

<maps:Map x:Name="Map" />

and code behind (constructor):

        {
            InitializeComponent();
            Position position = new Position(36.9628066, -122.0194722);
            MapSpan mapSpan = new MapSpan(position, 0.1, 0.1);
            Map.MoveToRegion(mapSpan);
            circle = new Circle();
            circle.IsClickable = true;
            circle.Center = position;
            circle.Radius = Distance.FromMeters(1000f);
            circle.StrokeColor = Color.FromHex("#88FF0000");
            circle.StrokeWidth = 8;
            circle.FillColor = Color.FromHex("#88FFC0CB");
            Map.Circles.Add(circle);
        }