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

Refresh Datasource on startZoom

2 Answers 116 Views
Map
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 13 Jul 2017, 02:55 PM

How can I refresh the map datasource on every zoom, maybe with either startZoom or endZoom?

2 Answers, 1 is accepted

Sort by
0
Nathan
Top achievements
Rank 1
answered on 13 Jul 2017, 04:53 PM

I think I found my solution. 

vm.radiusMap.layers[1].dataSource.data(myData);

0
Stefan
Telerik team
answered on 17 Jul 2017, 06:26 AM
Hello Nathan,

This is indeed the supported approach to programmatically change the data in the Map dataSource on the zoomStart event:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map#events-zoomStart

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-data

If other options need to change as well, we can suggest using the setOptions method of the Map:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map#methods-setOptions

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Map
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nathan
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or