HtmlMarkerLayer loses data points on clustering

Nikolay Mitikov 6 Reputation points
2022-05-25T15:01:09.12+00:00

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:

205467-lost-datapoint.png

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.

205525-datajson.txt

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
832 questions
{count} votes

2 answers

Sort by: Most helpful
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2022-05-26T16:20:12.99+00:00

    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.


  2. 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 cluster

    Expected - it is processed on initial load at once.
    Actual - Missed on initial load.

    215688-point-14-is-lost.log

    Regards,
    Nik


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.