How I can add shapes (not markers) in a way like this:
for (var i = 0; i < resources.length; i++) {
kendoMap.markers.add({
location: resources[i].point.coordinates,
title: value.Title,
shape: value.Css,
tooltip: {
showOn: "click",
autoHide: false,
}
});
}
Best Greetings
Cyril
1 Answer, 1 is accepted
0
Ianko
Telerik team
answered on 02 Jul 2014, 10:43 AM
Hello Cyril,
The Shapes feature of the RadMap is quite complex and declarative approach to add shapes to the layer is not possible. The only way to add/render shapes​ is by binding them to a MapLayer with type Shape.
The drawing of the shape is based on a complex SVG based logic and cannot be handled by a simple collections interaction through JavaScript. The markers are just SPAN element that on adding into the Markers collection only a child element is appended.
I suggest examining this help article about data binding the shapes and find a possible approach to change the data source either of the MapLayer or the RadClientDataSource and rebind the RadMap to dynamically change the shapes on the Map.
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.