AzureMapsControl.Components
AzureMapsControl.Components copied to clipboard
The popup won't close
I don't see how this can be an AzureMapsControl issue. But by the same measure, code I've seen for Azure Maps works for this.
I am creating a popup as:
PinTooltip = new Popup(new PopupOptions
{
// Position is set in OnPinMove()
Position = new Position(MapCenter!.X, MapCenter.Y),
PixelOffset = new Pixel(0, -20),
CloseButton = true,
OpenOnAdd = false,
});
await mapArgs.Map.AddPopupAsync(PinTooltip);
and then I display it as:
Action<PopupOptions> tooManyEntities = options =>
{
options.Content = $"<div style=\"padding:10px;color:black\">There are {numPoints} events at this location<br/>which is too large to display in a list.<br/>Please revise your search terms to reduce<br/>the number of events returned at this location.</div>";
options.Position = ((AtlasMapPoint)cluster.Geometry).Coordinates;
options.CloseButton = true;
};
Task.Run(async () => await PinTooltip!.SetOptionsAsync(tooManyEntities));
Task.Run(async () => await PinTooltip!.OpenAsync());
Note that I set OpenOnAdd = false and I display it with PinTooltip!.OpenAsync()
Clicking on the X does nothing - that popup is now up forever. Why?
Hi David,
On the samples I have the popup is closing fine when clicking on the close button. Do you have any error on the console or on the logs ? If not, can you please try and set up a repository reproducing the issue ?
Thanks
@arnaudleclerc I created a simple sample - and it works. So I'm now trying to figure out the difference.