Show entire layer at certain zoom range

3 posts, 1 answers
  1. Waqas
    Waqas avatar
    9 posts
    Member since:
    Oct 2011

    Posted 07 Jan 2014 Link to this post

    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. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 09 Jan 2014 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Waqas
    Waqas avatar
    9 posts
    Member since:
    Oct 2011

    Posted 21 Jan 2014 Link to this post

    Thanks Andrey Murzov, this is what i was looking.

    -Waqas Habib
Back to Top