Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin.Forms.Maps crashing on Android

$
0
0

Hi folks,
My Xamarin.Forms app crashes when trying to display a map on Android. Here's my code:

            var map = new Map(
                MapSpan.FromCenterAndRadius(
                        new Position(0,0), Distance.FromMiles(0.3)))
            {
                IsShowingUser = true,
                HeightRequest = 100,
                WidthRequest = 960,
                VerticalOptions = LayoutOptions.FillAndExpand
            };
            var stack = new StackLayout { Spacing = 0 };
            stack.Children.Add(map);
            Content = stack; 

I can't figure out what the issue is because it functions fine on iOS. It's not an API key issue, as I'm not even getting a grey box (I'd love for it to even reach that point) - it just crashes whenever I open the page.

Any help would be greatly appreciated, I've been tearing my head out with it for a couple of days now.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>