I am using Here Map -javascript to cluster the datapoints
function addToMapMarker(Poi, POIs) {
console.log(Poi);
const cord = { lat: Poi.location.latitude, lng: Poi.location.longitude };
const parisMarker = new H.map.Marker(cord);
this.hereMap.addObject(parisMarker);
this.startClustering(this.hereMap, POIs, cord);
}
startClustering(map, Poi, cord) {
const dataPoints = Poi.map(function(item) {
return new H.clustering.DataPoint(item.latitude, item.longitude);
});
this.hereMap.setCenter(cord);
const clusteredDataProvider = new H.clustering.Provider(dataPoints, {
clusteringOptions: {
eps: 30,
minWeight: 2
}
});
const clusteringLayer = new H.map.layer.ObjectLayer(clusteredDataProvider);
map.getLayers().add(clusteringLayer);
map.getViewModel().setLookAtData({
bounds: clusteredDataProvider.getRootGroup().getBoundingBox()
});
map.addLayer(clusteringLayer);
// clusteredDataProvider.addEventListener('update', function(evt) {
// // target is Provider itself after clustering is completed
// if (evt.target === this) {
// }
// });
// map.addLayer(clusteringLayer);
}
I am new to the here map .Basically Map rendering ,COuld anyone please help to solve this issue.I went through docs and api ,not sure where I am going wrong