3 Answers, 1 is accepted
0
Hi Joe,
Here is a simple example illustrating how a single DataSource could be used by multiple Map widgets.
Regards,
Alexander Popov
Telerik
Here is a simple example illustrating how a single DataSource could be used by multiple Map widgets.
Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joe
Top achievements
Rank 1
answered on 02 Oct 2014, 02:10 PM
Hi Alexander,
Thank you for the reply and the example. I see that the example works, but I'm still having issues with the map widget. I'm calling a webapi controller to get geojson for a map layer. It works with the html helper, but I want to use the javascript widget. Please see the attached file that contains javascript, webapi, and sample data. Would you please see what I'm doing wrong?
Thank you!
Thank you for the reply and the example. I see that the example works, but I'm still having issues with the map widget. I'm calling a webapi controller to get geojson for a map layer. It works with the html helper, but I want to use the javascript widget. Please see the attached file that contains javascript, webapi, and sample data. Would you please see what I'm doing wrong?
Thank you!
0
Hello again Joe,
I reviewed the attached code snippets and I noticed that the DataSource object is used as and additional data parameter for the Map's DataSource. I would recommend specifying the type of the separate DataSource instance and refer it in the Map's layer options. For example:
Regards,
Alexander Popov
Telerik
I reviewed the attached code snippets and I noticed that the DataSource object is used as and additional data parameter for the Map's DataSource. I would recommend specifying the type of the separate DataSource instance and refer it in the Map's layer options. For example:
var
ds =
new
kendo.data.DataSource({
type:
"geojson"
,
transport: {
read: {
url:
"/api/ReportData/GetMoStateMap"
,
...
}
}
});
$(
"#map2"
).kendoMap({
layers: [..
{
type:
"shape"
,
dataSource: ds
}
],
Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!