Maui: [BUG] Map not responding to span (zoom) requests in Windows
Is there an existing issue for this?
- I have searched the existing issues
Did you read the “Reporting a bug” section on Contributing file?
- I have read the “Reporting a bug” section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
The MoveToRegion command of the Map changes the location, but does not change the span or zoom of the map in Windows. IsZoomEnabled is true.
Expected Behavior
The map should change its zoom/span to the requested parameters. The Android map is behaving correctly. The map is changing its zoom/span to the requested parameters.
Steps To Reproduce
- Open and run the project from the repository
- Add your keys to AndroidManifest.xml (to verify that it works on Android) and MauiProgram.cs
- Click Move 1, then Move 2, etc. and observe that the span is not changing, while the location is.
- Also note that the Add Circle command does not seem to work on Windows.
Link to public reproduction project repository
https://github.com/bluedot/TestMap2
Environment
- .NET MAUI CommunityToolkit: 2.0.0
- OS: Windows 11
- .NET MAUI: 8.0.3
Anything else?
Hopefully, everything should be in the repository.
### Tasks
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Fixes #1686 by setting map region with additional parameters to set requested zoom level. — committed to mikelor/CommunityToolkit-Maui by mikelor 2 years ago
- Fixes [BUG] Map not responding to span (zoom) requests in Windows #1686 (#2323) — committed to CommunityToolkit/Maui by mikelor 2 years ago
Hey @bijington, I implemented a fix for this. Let me know if I need to do anything else.
@mikelor It does move to the new center, but does not set width and height requested. Clear from the source code snippet provided above.
Try Distance.FromMeters(100)It don’t zoom, looks always like 1 km.Von meinem/meiner Galaxy gesendet -------- Ursprüngliche Nachricht --------Von: mike lorengo @.> Datum: 22.07.24 17:31 (GMT+01:00) An: CommunityToolkit/Maui @.> Cc: TFreudi1 @.>, Comment @.> Betreff: Re: [CommunityToolkit/Maui] [BUG] Map not responding to span (zoom) requests in Windows (Issue #1686) @ckrutsinger do you have a simple example that demonstrates this? The CommunityToolkit.Samples application works for me, but I’m not sure if that’s what you are trying to do. void Button_OnClicked(object? sender, EventArgs e) { BasicMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Location(50, 6), Distance.FromKilometers(1))); }
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>