dotnet / dotnet/maui

Maps control inside ScrollView on Android does not size correctly

Open
#28,085 7 comments 0 reactions 0 assignees View on GitHub
area-controls-map area-controls-scrollview platform/android t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

When a Map control is inside a ScrollView on Android it will shrink to fit only the zoom buttons on the map control

![Image](https://github.com/user-attachments/assets/7f66d6f1-c3b0-4f19-9602-248a1b35a44b)

Where on iOS it will fill the screen properly:

![Image](https://github.com/user-attachments/assets/4a9f974c-c3c1-4a94-bfc2-f602580dfbf8)

### Steps to Reproduce

1. Create a File > New .NET MAUI App
2. Replace MainPage.xaml with this
`




`
3. Follow instructions for setting up map control for iOS/Android here: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/map?view=net-maui-9.0

Expected outcome: Map Control fills the screen
Actual outcome: Map Control is sized only big enough to fit the zoom buttons

### Link to public reproduction project repository

_No response_

### Version with bug

9.0.40 SR4

### Is this a regression from previous behavior?

Not sure, did not test other versions

### Last version that worked well

_No response_

### Affected platforms

Android

### Affected platform versions

_No response_

### Did you find any workaround?

None that I know of other than removing it out of the ScrollView. Although if your page uses a RefreshView it must use a ScrollView to be functional.

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Research direction

Start with the MainPage.xaml reproduction in the issue and run the .NET MAUI app on Android with the Map inside a ScrollView. Trace the Android map control's sizing behavior, then verify that the map fills the screen inside the ScrollView while the reported RefreshView use case remains possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.