Hi. I'm trying to have a shape layer connected to a local Datasource like this:
The two shapes are drawn, but when you change the zoom level, only the last one remains. The rest vanish silently.
What I'm missing?
var
shapes =
new
kendo.data.DataSource({type:
"geojson"
});
$(
"#map"
).kendoMap({
center: [44, 10],
zoom: 4,
layers: [{
type:
"shape"
,
dataSource: shapes,
style: { fill: { opacity: 1 }}
}],
shapeCreated:
function
(e) {
var
shape = e.shape;
shape.fill(
"#88f"
);
}
});
shapes.add({
"id"
:
"FRA"
,
"type"
:
"Feature"
,
"geometry"
: {
"type"
:
"Polygon"
,
"coordinates"
: [[ [-4,48], [2,51], [9,44], [-2,45] ]] }
});
shapes.add({
"id"
:
"ESP"
,
"type"
:
"Feature"
,
"geometry"
: {
"type"
:
"Polygon"
,
"coordinates"
: [[ [-9,43], [3,43], [2,36], [-9,37] ]] }
});
The two shapes are drawn, but when you change the zoom level, only the last one remains. The rest vanish silently.
What I'm missing?