AzureMapsControl.Components icon indicating copy to clipboard operation
AzureMapsControl.Components copied to clipboard

OnClick has 0 MapMouseEventArgs.Shapes for a clustered SymbolLayer

Open DavidThielen opened this issue 1 year ago • 2 comments

I have tested this with both AzureMap.OnClick and SymbolLayer.OnClick.

For a pin with a single point both OnClick() event handlers are passed a MapMouseEventArgs.Shapes has the expected 1 point and the MapMouseEventArgs.Features has 0 entries.

For a clustered point, both OnClick() event Handlers are passed a MapMouseEventArgs.Shapes with 0 entries and a MapMouseEventArgs.Features with 1 entry that has the cluster properties ("point_count", etc.)

According to this sample, both OnClick() event handlers should be passed a list of entries in the MapMouseEventArgs.Shapes.

I can create an example if needed. Please note that this sample does not access the MapMouseEventArgs.Shapes.

DavidThielen avatar Mar 24 '24 17:03 DavidThielen

Here's a simple example showing the issue.

Map_NoShapes.zip

DavidThielen avatar Mar 25 '24 15:03 DavidThielen

According to @rbrundritt (see here), the Shapes collection should be empty and the pins in the cluster can be read with:

datasource.getClusterLeaves(cluster.properties.cluster_id, Infinity, 0)

which leads to the question, does the DataSource class have that call? I can't find it. thanks - dave

DavidThielen avatar Mar 25 '24 16:03 DavidThielen