We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to drilldown map layers.

MapLayers can be drilldown by using the following steps,

Step1: Create a Maps Sample and include the necessary script files

Step2: Maps enable drilldown by clicking on the map region.When Shape gets Selected, Using BaseMapIndex the initial layer loaded in map.


 <maps:SfMap EnableZoom="False" EnablePan="False" x:Name="map" ShowCoords="False">


<maps:ShapeFileLayer MapPopupVisibility="Collapsed" Background="#FFF4F4F4"

ItemsSource="{Binding Models}" ShapeIDPath="Continent" ShapeIDTableField="Continent"

EnableSelection="True" Uri="SalesAnalysisDemo.ShapeFile.continent.shp" >

<maps:ShapeFileLayer.ItemsTemplate> <DataTemplate>

<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False" >

                <TextBlock HorizontalAlignment="Center" Foreground="#FF333333" Text="{Binding Data.Continent}"/>

                <TextBlock HorizontalAlignment="Center" Foreground="#FF333333" Text="{Binding Data.DisplaySalesValue}"/>





  <maps:ShapeFileLayer MapItemsVisibility="Collapsed" ShapeIDPath="Country"

MapPopupVisibility="Visible" Background="#FFF4F4F4" ShapeIDTableField="Country"

PopupCustomTemplate="{StaticResource PopupKey}" ItemsSource="{Binding SalesByCountry}"




void Maps_ShapesSelected(object sender, SelectionEventArgs args)


            SalesByContinet salesByContinent = ((args.Items as ObservableCollection<MapShape>)[0].DataContext as SalesByContinet);

            if (salesByContinent != null)


                if (salesByContinent.Continent == "Africa")


                    this.map.BaseMapIndex = 6;


                else if (salesByContinent.Continent == "Oceania")


                    this.map.BaseMapIndex = 1;




The following screenshot shows the drilldown of maplayers





Article ID: Published Date: Last Revised Date: Platform: Control:
7647 04/07/2017 04/07/2017 WPF SfMaps
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon