Hi,
What is the most efficient way to update the map layer datasource? For this map I use a url I'd like updated (because a get parameter changes).
I read this: http://d585tldpucybw.cloudfront.net/forums/change-marker-layer%27s-data-source
But it's outdated, currently there is no more _initDataSource() and the setDataSource() did find its way to the layer object but I can't get it to work:
don't find an example for it.
also, I tried:
var
layer = $(
"#selectionMap"
).data(
"kendoMap"
).layers[0];
layer.dataSource.transport ={read:$scope.baseUrl+
"/MapStatistics"
+
"?countryvar="
+$scope.ui.subSelections.countryVar};
layer.reset();
Also tried this:
layer.setDataSource({type:
"geojson"
,transport: {read:$scope.baseUrl+
"/MapStatistics"
+
"?countryvar="
+$scope.ui.subSelections.countryVar}})
Error: this.dataSource.unbind is not a function
So my question: Is there an efficient way to do this so the map is reloaded on layer url update?
thanks,
Arno