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

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

Open PaoloLeva opened this issue 4 years ago • 0 comments

VERSIONS

  • Xamarin.Forms.GoogleMaps - 3.3.0
  • Xamarin.Forms - 4.8.0.1687

PLATFORMS

  • [x] Android
  • [ ] iOS
  • [ ] UWP

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);
        }

PaoloLeva avatar Nov 16 '20 23:11 PaoloLeva