Skip to content
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

[Android] Fix Map not setting initial properties #10739

Merged
merged 1 commit into from Oct 17, 2022
Merged

[Android] Fix Map not setting initial properties #10739

merged 1 commit into from Oct 17, 2022

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Fix Map not setting initial properties.

fix-10394

Issues Fixed

Fixes #10394

map.MarkerClick += OnMarkerClick;
map.InfoWindowClick += OnInfoWindowClick;
map.MapClick += OnMapClick;

if (VirtualView != null)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change. The mapper invoke the mapping methods to update basic properties, but in the case of the zoom for example, the map is not initialized yet and nothing is done. For that reason, we apply changes to set the basic properties when having the map ready.

MapType.Hybrid => GoogleMap.MapTypeHybrid,
_ => throw new ArgumentOutOfRangeException(),
};
googleMap?.UpdateMapType(map);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to extension methods. On the one hand, we achieve homogeneity with other handlers code but in the other hand it is also necessary to invoke some properties update when the map is ready.

@rmarinho rmarinho merged commit e7be2f9 into main Oct 17, 2022
@rmarinho rmarinho deleted the fix-10394 branch October 17, 2022 21:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-map Map / Maps platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 7: Maps control doesn't show zoom controls with constant IsZoomEnabled="true"
3 participants