This is a migrated thread and some comments may be shown as answers.

Show entire layer at certain zoom range

2 Answers 46 Views
Map
This is a migrated thread and some comments may be shown as answers.
Waqas
Top achievements
Rank 1
Waqas asked on 07 Jan 2014, 04:03 PM
Hi,

I am using informationlayer and visualization layer to render my data. I am also using PolygonData to create my shapes. Here i want to hide my entire layer at certain zoom level. I have used below mentioned function but it is not working properly on entire layer. If i use it for a single label for example then it properly hide and show this label.

I am using this

MapLayer.SetZoomRange(myLayer, new ZoomRange(13, 18));

I am also not able to use this for my individual item which is PolygonData because of DepedencyObject.

Please let me know if i am getting something wrong or can anyone provide any alternate solution to show entire layer at certain zoomrange.

Thanks
Waqas Habib

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 09 Jan 2014, 11:13 AM
Hi Waqas,

Unfortunately the information layer as well as the visualization layer do not support the zoom range feature. We already have logged a feature request for the implementation of this feature in our feedback portal, where you can vote for it and track its status.

Currently you can use the RadMap.ZoomChanged event to show or to hide the layer:

public partial class MainWindow : Window
{
    ZoomRange range = new ZoomRange(13, 18);
 
    public MainWindow()
    {
        InitializeComponent();
 
        this.Loaded += MainWindow_Loaded;
    }
 
    void MainWindow_Loaded(object sender, RoutedEventArgs e)
    {
        this.radMap.ZoomChanged += radMap_ZoomChanged;
    }
 
    void radMap_ZoomChanged(object sender, EventArgs e)
    {
        if (this.range.InRange(this.radMap.ZoomLevel))
        {
            this.myLayer.Visibility = System.Windows.Visibility.Visible;
        }
        else
        {
            this.myLayer.Visibility = System.Windows.Visibility.Collapsed;
        }
    }
}


Regards,
Andrey Murzov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.



Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.



Sign up for Free application insights >>
0
Waqas
Top achievements
Rank 1
answered on 21 Jan 2014, 01:55 PM
Thanks Andrey Murzov, this is what i was looking.

-Waqas Habib
Tags
Map
Asked by
Waqas
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Waqas
Top achievements
Rank 1
Share this question
or