GeometryCollections don't support clustering. Only individual points support clustering.
Azure Maps: Bug when parsing a GeoJson GeometryCollection when a DataSource's cluster property is true
Anonymous
Repro program here: https://codepen.io/theGrahamScanlon/pen/vYGEVKa (make sure to update the auth token)
If the datasource that loads in the below geojson has the 'cluster' property set to true, the datasource fails to load with the exception: "Cannot read property '0' of undefined @ atlas.min.js:2509". The datasource loads in fine when the 'cluster' property is set to false
var geoJson = {
type: "FeatureCollection",
features: [
{
type: "Feature",
geometry: {
type: "GeometryCollection",
geometries: [
{
type: "Point",
coordinates: [2, 2]
},
{
type: "Point",
coordinates: [1, 1]
}
]
},
properties: {}
}]
};
-Graham
Accepted answer
-
rbrundritt 18,686 Reputation points Microsoft Employee
2020-08-14T16:01:15.927+00:00