Hide map pins.

4 posts, 0 answers
  1. Mark
    Mark avatar
    3 posts
    Member since:
    Apr 2012

    Posted 06 Jul 2012 Link to this post

    I am using dynamic layers to retrieve data depending on the zoom level and it's working great. However, the user would like to be able to hide certain map pins by checking a show/hide checkbox on the form.

    Is it possible to hide items on a dynamic layer? Or even set the visibility of the layer?

    I did think about refreshing it's datasource but I cannot find a way to force the map to rebind, I could move the map center programmatically which would cause the ItemsRequest to fire but that seems like a hack.

    Is there a way to force a rebind of the data or hide the pins?

    Many thanks,
    Mark

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 10 Jul 2012 Link to this post

    Hi Mark,

    You can change the visibility of the layer using the DynamicLayer.Visibility property.
    When you want to reload the data on the layer then you can invoke the DynamicLayer.Refresh method.

    Regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sergey
    Sergey avatar
    26 posts
    Member since:
    Jun 2012

    Posted 18 Dec 2012 Link to this post

    Calling Refresh causes all items to flash. Is there a way to refresh dynamic layer without flashing? (similar to the way information layer items don't flash if you change visibility of one or more items)
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 20 Dec 2012 Link to this post

    Hello Sergey,

    Unfortunately it is not possible. When refreshing the DynamicLayer removes all existing items and reloads them.

    Regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top