static void UpdateMapElementOnPointerExited(MapElement mapElement, MapIconStateToStyleEntryState toStyleEntryState)
        {
            var state = (MapIconState)(mapElement.Tag ?? MapIconState.None);

            if (state.HasFlag(MapIconState.Hover) && !state.HasFlag(MapIconState.Disabled))
            {
                state         &= ~MapIconState.Hover;
                mapElement.Tag = state;
                mapElement.MapStyleSheetEntryState = toStyleEntryState(state);
            }
        }
        static void UpdateMapElementOnClick(MapElement mapElement, MapIconStateToStyleEntryState toStyleEntryState)
        {
            var state = (MapIconState)(mapElement.Tag ?? MapIconState.None);

            if (!state.HasFlag(MapIconState.Disabled))
            {
                // Toggle Selected flag (clear bit then OR-in toggled value)
                state          = (state & ~MapIconState.Selected) | (state ^ MapIconState.Selected);
                mapElement.Tag = state;
                mapElement.MapStyleSheetEntryState = toStyleEntryState(state);
            }
        }