hi @Gprior ,
Yes, you can add a button to show or hide the labels of the pins on the map in your canvas app.
Create a variable to manage the visibility of the pin labels. For instance, you can create a boolean variable named showLabels.
// In the OnSelect property of your button, toggle the value of showLabels:
UpdateContext({showLabels: !showLabels})
Assuming you have a map component named Map1 and the pins are retrieved from a SharePoint list, you can update the labels' visibility based on the showLabels variable.
// In the Items property of your map component, you can use a formula that conditionally includes the labels:
ForAll(
YourSharePointList,
{
Latitude: ThisRecord.Latitude,
Longitude: ThisRecord.Longitude,
Label: If(showLabels, ThisRecord.Label, "")
}
)
Replace YourSharePointList with the actual name of your SharePoint list and Latitude, Longitude, and Label with the actual column names used in your list.