in Components/PCF/AzureMaps/data-set/azureMapsDataSetControl/index.ts [270:296]
private onClick(e: any) {
//Make sure the event occurred on a point feature.
if (e.shapes && e.shapes.length > 0) {
let content, coordinate;
let properties = e.shapes[0].getProperties();
//Check to see if the first value in the shapes array is a Point Shape.
if (e.shapes[0] instanceof azureMapsControl.Shape && e.shapes[0].getType() === 'Point') {
this._context.navigation.openForm(
{
entityName: this._context.parameters.sampleDataSet.getTargetEntityType(),
entityId: properties.id
}
);
} else if (e.shapes[0].type === 'Feature' && e.shapes[0].geometry.type === 'Point') {
//Check to see if the feature is a cluster.
if (!e.shapes[0].properties.cluster) {
this._context.navigation.openForm(
{
entityName: this._context.parameters.sampleDataSet.getTargetEntityType(),
entityId: properties.id
}
);
}
}
}
}