Markers are not drawn through IMGUI or uGUI.
In the Draw to Texture mode, the markers are drawn on the texture.
In Tileset mode, the markers are separate meshes.
I reread your first post several times carefully, and realized that I missed an important thing in your question: that you're asking about all interaction with markers, not just tooltips.
To disable all interaction with markers outside the mask, you need to override the marker drawer.
If you are using Drawing to Texture mode, you need to override OnlineMapsMarkerBufferDrawer.
If you are using Tileset mode, you need to override OnlineMapsMarkerFlatDrawer.
Something like:
using UnityEngine;
namespace InfinityCode.OnlineMapsSupport
{
public class MaskedMarkerDrawer: MonoBehaviour
{
public OnlineMaps map;
public RectTransform mask;
private void Start()
{
if (map == null) map = OnlineMaps.instance;
map.control.markerDrawer = new Drawer(map.control, mask);
}
public class Drawer : OnlineMapsMarkerBufferDrawer
{
private RectTransform mask;
public Drawer(OnlineMapsControlBase control, RectTransform mask) : base(control)
{
this.mask = mask;
}
private bool IsPositionMasked(Vector2 position)
{
return RectTransformUtility.RectangleContainsScreenPoint(mask, position);
}
public override OnlineMapsMarker GetMarkerFromScreen(Vector2 screenPosition)
{
if (!IsPositionMasked(screenPosition)) return null;
return base.GetMarkerFromScreen(screenPosition);
}
}
}
}
Kind Regards,
Infinity Code Team.
Boost your productivity a lot and immediately using
Ultimate Editor Enhancer.
Trial and non-commerce versions available.