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

Hide map pins.

3 Answers 80 Views
Map
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 06 Jul 2012, 10:27 AM
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

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 10 Jul 2012, 02:59 PM
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 >>

0
Sergey
Top achievements
Rank 1
answered on 18 Dec 2012, 12:34 PM
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)
0
Andrey
Telerik team
answered on 20 Dec 2012, 09:34 AM
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.

Tags
Map
Asked by
Mark
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or