menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfMaps - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfMaps

    Represents the SfMaps control. To render this, create an instance of the SfMaps class and set required properties.

    Inheritance
    System.Object
    SfMaps
    Namespace: Syncfusion.SfMaps.XForms
    Assembly: Syncfusion.SfMaps.XForms.dll
    Syntax
    public class SfMaps : View, IParentThemeElement, IThemeElement

    Constructors

    SfMaps()

    Initializes a new instance of the SfMaps class. Using this instance, set a value for required properties in maps.

    Declaration
    public SfMaps()

    Fields

    BaseMapIndexProperty

    Gets or sets a value for the BaseMapIndex property to the maps. This property allows drill-down from main layer to another layer.

    Declaration
    public static readonly BindableProperty BaseMapIndexProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnablePanningProperty

    Gets or sets a value indicating whether to allow panning or not in maps . This is a bindable property.

    Declaration
    public static readonly BindableProperty EnablePanningProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EnableZoomingProperty

    Gets or sets a value that indicates whether the zooming is enable or not for maps. It gets a closer look at a particular area in maps.

    Declaration
    public static readonly BindableProperty EnableZoomingProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    LayersProperty

    Gets or sets the ShapeFileLayer property value from maps. The maps control is maintained through layers, and it can accommodate one or more layers.

    Declaration
    public static readonly BindableProperty LayersProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MaxZoomProperty

    Gets or sets the maximum zooming level property of the maps. It sets a value of the maximum zoom level for maps.

    Declaration
    public static readonly BindableProperty MaxZoomProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MinZoomProperty

    Gets or sets the minimum zooming level property of maps. It sets a value of the minimum zoom level for maps.

    Declaration
    public static readonly BindableProperty MinZoomProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    ZoomLevelProperty

    Gets or sets the ZoomLevel value property of maps. It customizes the zooming level value in maps.

    Declaration
    public static readonly BindableProperty ZoomLevelProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    BaseMapIndex

    Gets or sets the BaseMapIndex value to the maps. This property allows drill-down from main layer to another layer.

    Declaration
    public int BaseMapIndex { get; set; }
    Property Value
    Type
    System.Int32

    EnablePanning

    Gets or sets a value indicating whether to allow panning in maps. It moves a map around to focus on a specific area.

    Declaration
    public bool EnablePanning { get; set; }
    Property Value
    Type
    System.Boolean

    EnableZooming

    Gets or sets a value indicating whether the zooming is enabled or not in the maps control. It gets a closer look at a particular area.

    Declaration
    public bool EnableZooming { get; set; }
    Property Value
    Type
    System.Boolean

    Layers

    Gets or sets the ShapeFileLayer value from maps. The maps control is maintained through layers, and it can accommodate one or more layers.

    Declaration
    public ObservableCollection<MapLayer> Layers { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<MapLayer>

    MaxZoom

    Gets or sets the maximum zooming level property of the maps. It sets a value of the maximum zoom level for maps.

    Declaration
    public int MaxZoom { get; set; }
    Property Value
    Type
    System.Int32

    MinZoom

    Gets or sets the minimum zooming level of the maps. It sets a value of the minimum zoom level for maps.

    Declaration
    public int MinZoom { get; set; }
    Property Value
    Type
    System.Int32

    ZoomLevel

    Gets or sets the ZoomLevel value of maps. It is used to customize the zooming level value in maps.

    Declaration
    public int ZoomLevel { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    OnBindingContextChanged()

    Override method.

    Declaration
    protected override void OnBindingContextChanged()

    OnSizeRequest(Double, Double)

    Raises the size request event.

    Declaration
    protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    Width constraint.

    System.Double heightConstraint

    Height constraint.

    Returns
    Type Description
    Xamarin.Forms.SizeRequest

    size request.

    Events

    Panning

    Event raised when the dragging finger on the map control.

    Declaration
    public event EventHandler<MapPanUpdatedEventArgs> Panning
    Event Type
    Type
    System.EventHandler<MapPanUpdatedEventArgs>

    Tapped

    Event raised when the control tapped.

    Declaration
    public event EventHandler<MapTappedEventArgs> Tapped
    Event Type
    Type
    System.EventHandler<MapTappedEventArgs>

    TooltipOpening

    Occurs whenever tooltip is rendered for maps. It is an event.

    Declaration
    public event EventHandler<TooltipOpeningEventArgs> TooltipOpening
    Event Type
    Type
    System.EventHandler<TooltipOpeningEventArgs>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved