-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Map not responding to span (zoom) requests in Windows #1686
Comments
I can see that in the map handler implementation, the MapSpan is used to set the center but not the width and height of the map view. See https://raw.githubusercontent.com/CommunityToolkit/Maui/main/src/CommunityToolkit.Maui.Maps/Handler/Map/MapHandler.Windows.cs
https://learn.microsoft.com/en-us/bingmaps/v8-web-control/map-control-concepts/map/change-the-map-view |
+1 |
Is this something that will be addressed? |
Would you be willing to contribute the fix via a PR? |
@bijington I don't know how to fix it. |
Oh sorry I read this comment (#1686 (comment)) and assumed it meant you had an idea where the issue is |
Same here, zomm did'nt work. Is it solved or planned to solve ? |
@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.
EDIT: Just saw your sample above. Going to take a look. |
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: ***@***.***>
|
@mikelor It does move to the new center, but does not set width and height requested. Clear from the source code snippet provided above. |
Yep. I was able to duplicate it. I took a look and @ckrutsinger is correct. The handler code is only using the center to set the region.
and modified the setRegion script as follows
That seems to fix it, as shown in the video below. maps.mp4 |
I'm going to test a couple of map projects I have with the new code. |
Any update on implementing this fix and when it will be released? |
You could implement the code fix listed above. I'm traveling at the moment, so I won't be able to submit a pull request until next week. |
…ameters to set requested zoom level.
Hey @bijington, I implemented a fix for this. Let me know if I need to do anything else. |
hey @losh99 this is now in release 2.04 of CommunityToolkit.Maui.Maps |
Thanks @mikelor really appreciated! |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
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
Link to public reproduction project repository
https://github.com/bluedot/TestMap2
Environment
Anything else?
Hopefully, everything should be in the repository.
Tasks
The text was updated successfully, but these errors were encountered: