Skip to content

Provide access to current map zoom level #11332

@smitha-cgi

Description

@smitha-cgi

Description

I want to know the current map zoom level for various reasons. I can get it on Android using this:

var mapHandler = (IMapHandler?)map.Handler;
var googleMap = mapHandler?.Map;
if (mapHandler is not null && googleMap is not null)
{
    currentZoom = googleMap.CameraPosition.Zoom;
}

(Note that it seems far more complicated on iOS)

I would prefer to simply be able to access map.Zoom instead.

Public API Changes

Add a Zoom property to the Microsoft.Maui.Controls.Maps.Map class which returns the Android/iOS map control zoom level.

Intended Use-Case

Make it easier to get current zoom level

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions