Hidding objects when zooming

6 posts, 0 answers
  1. Vladimír
    Vladimír avatar
    4 posts
    Member since:
    Feb 2013

    Posted 13 Oct 2014 Link to this post

    Hello,

    I have noticed when zooming on silverlight map control that objects are hidden when zooming.
    Is there any way how to achieve that behavior on WPF map control by turning on/off some property or how to does it in different way?

    Thx, Vlada
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Oct 2014 Link to this post

    Hi Vladimir,

    Can you point us to the SL demo / sample you are looking at ? 
    In both WPF and SL you can use VisualizationLayer. On its items, you can set the MapLayer.ZoomRange attached property to control the visibility of the item based on the current zoom level. Let us know if this is what you need.
    <telerik:RadMap x:Name="radMap"
                    ZoomLevel="8"
                    Center="42.6957539183824, 23.3327663758679">
        <telerik:RadMap.Provider>
            <telerik:OpenStreetMapProvider />
        </telerik:RadMap.Provider>
        <telerik:VisualizationLayer x:Name="visualizationLayer">
            <Ellipse x:Name="Ellipse"
                     telerik:MapLayer.Location="42.6957539183824, 23.3327663758679"
                     telerik:MapLayer.BaseZoomLevel="8"
                     telerik:MapLayer.ZoomRange="5,12"
                     telerik:MapLayer.MaxScale="8"


    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Vladimír
    Vladimír avatar
    4 posts
    Member since:
    Feb 2013

    Posted 15 Oct 2014 in reply to Petar Mladenov Link to this post

    Hi Petar,

    this is not exactly what I'm looking for. This solution hides objects when I zoom out of that given range.

    Here is that SL demo: http://demos.telerik.com/silverlight/#Map/ClusterVirtualization
    When I zoom In/Out it does not matter on zoom level these objects hide.
    That solves performance issue and it looks better as well.

    Thx, Vlada
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 15 Oct 2014 Link to this post

    Hi Vladimir,

    If Clustering is what you need, we highly encourage you to start with the following support resources.

    RadMap VisualizationLayer Clustering
    XAMlL SDK: RadMap Clustering Sample


    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Vladimír
    Vladimír avatar
    4 posts
    Member since:
    Feb 2013

    Posted 15 Oct 2014 in reply to Petar Mladenov Link to this post

    Hi Petar,

    I apologize if I'm not clear but I'm looking for behavior of the map when zooming, respectively
    when zooming *starts*,
    - at this moment every object on the map in SL demo is hidden.
    When zooming ends,
    - all objects (clusters, etc.) are recalculated and displayed again.

    Is that behavior possible to get in WPF map?

    Thx, Vlada
  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 16 Oct 2014 Link to this post

    Hello Vladimir,

    The demo you mentioned is also available for wpf - it is part in our WFP Demos which you get when you download Telerik UI for WPF. It showcases RadMap's Virtualization and Clustering features which are also available in WPF. Please let us know if you feel any difficulties when setting up these features in your real world application.

    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready