MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfMaps

    Show / Hide Table of Contents

    Class SfMaps

    Maps is a powerful data visualization component that displays statistical information for a geographical area. It has highly interactive and customizable features such as selection, tooltip, legends, markers, bubbles, and color mapping. Users can generate maps for population density, sales, political boundaries, weather, elections, and routes.

    The Layer is contains MapShapeLayer or MapTileLayer as a content of Maps.

    Inheritance
    System.Object
    SfMaps
    Implements
    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Namespace: Syncfusion.Maui.Maps
    Assembly: Syncfusion.Maui.Maps.dll
    Syntax
    public class SfMaps : View, IContentView, IView, IElement, ITransform, IPadding, IMaps

    Constructors

    SfMaps()

    Initializes a new instance of the SfMaps class.

    Declaration
    public SfMaps()

    Fields

    LayerProperty

    Identifies the Layer bindable property.

    Declaration
    public static readonly BindableProperty LayerProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Layer bindable property.

    Properties

    Layer

    Gets or sets the MapShapeLayer as a content of map in which geographical rendering is done.

    Declaration
    public MapLayer Layer { get; set; }
    Property Value
    Type Description
    MapLayer
    Examples
    • XAML
    • C#
    <map:SfMaps>
       <map:SfMaps.Layer>
          <map:MapShapeLayer x:Name="layer"
                             ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json"
                             ShapeFill="Gray"
                             ShapeStroke="White" />
       </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    layer.ShapeFill = Colors.Gray;
    layer.ShapeStroke = Colors.White;
    maps.Layer = layer;
    this.Content = maps;

    Methods

    OnBindingContextChanged()

    Invoked whenever the binding context of the View changes.

    Declaration
    protected override void OnBindingContextChanged()

    Implements

    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved