Where did you get the html marker JavaScript file from? I just noticed that the Azure Maps sample site appears to be using an older version that is buggy, while the files in the dist folder of the HTML Marker module project are more up to date. I suspect this is the issue as I'm seeing different less markers when using the version from the sample site.
HtmlMarkerLayer loses data points on clustering
Use clustered pie chart html markers to display data leads to losing points.
That is clearly observed by using same datasource with additional bubbleLayer on top.
Unlike both 'atlas.layer.BubbleLayer' and 'atlas.layer.SymbolLayer', the 'atlas.layer.HtmlMarkerLayer' misses points:
The sample data is attached, for convenience IPs were changed to sequential numbers (1-53).
The markerCallback function prints Ip to console like:
if (properties.cluster){
datasource.getClusterLeaves(properties.cluster_id).then(leafs => {
const props = leafs.reduce((a, v) => {
const { data } = v;
a.push(data.properties.Ip);
return a;
}, []);
const message = props.join(', ');
console.log(message);
});
}
else
{
console.log(properties.Ip);
}...
The logs illustrate old-good bubble layer shows ip 51, but it is missing in console logs.
The test data attached.
Expected: No discrepancies between bubble and HtmlMarkerLayer.
Actual: Data points are missing, and appear only on super-close zoom.
Azure Maps
2 answers
Sort by: Most helpful
-
rbrundritt 20,836 Reputation points Microsoft Employee Moderator
2022-05-26T16:20:12.99+00:00 -
Nikolay Mitikov 6 Reputation points
2022-06-28T10:57:32.847+00:00 Hi @rbrundritt , thanks for the hint, indeed pulling later version from dist folder made things slightly better.
However, still a portion of data is lost, like point 14, please refer to attached log:
A) Initial load is over, no point 14; I print "render over, no point 14" into console
B) I zoom in and observe point 14 to appear in German clusterExpected - it is processed on initial load at once.
Actual - Missed on initial load.Regards,
Nik