/// <summary>
    /// Method that is called when you press the map.
    /// </summary>
    protected void OnMapBasePress()
    {
        isMapPress = false;

        if (waitZeroTouches)
        {
            if (GetTouchCount() <= 1)
            {
                waitZeroTouches = false;
            }
            else
            {
                return;
            }
        }

        dragMarker = null;
        if (!HitTest())
        {
            return;
        }

#if !IGUI && ((!UNITY_ANDROID && !UNITY_IOS) || UNITY_EDITOR)
        if (map.notInteractUnderGUI && GUIUtility.hotControl != 0)
        {
            return;
        }
#endif

        Vector2 inputPosition = GetInputPosition();

        if (EventSystem.current != null)
        {
            PointerEventData pe = new PointerEventData(EventSystem.current);
            pe.position = inputPosition;
            List <RaycastResult> hits = new List <RaycastResult>();
            EventSystem.current.RaycastAll(pe, hits);
            if (hits.Count > 0 && hits[0].gameObject != gameObject)
            {
                return;
            }
        }

        if (OnMapPress != null)
        {
            OnMapPress();
        }

        lastClickTimes[0] = lastClickTimes[1];
        lastClickTimes[1] = DateTime.Now.Ticks;

        bool hit = GetCoords(out lastPositionLng, out lastPositionLat);
        lastInputPosition = pressPoint = inputPosition;
        if (!hit)
        {
            return;
        }

        isMapPress = true;

        OnlineMapsMarker marker = null;

        if (this is OnlineMapsControlBase3D && OnlineMapsControlBase3D.instance.marker2DMode == OnlineMapsMarker2DMode.billboard)
        {
            OnlineMapsMarkerInstanceBase instanceBase = OnlineMapsControlBase3D.instance.GetBillboardMarkerFromScreen(inputPosition);
            if (instanceBase != null)
            {
                marker = instanceBase.marker as OnlineMapsMarker;
            }
        }
        else
        {
            marker = map.GetMarkerFromScreen(inputPosition);
        }

        bool allowMapLongPress = true;

        if (marker != null)
        {
            if (marker.OnPress != null)
            {
                marker.OnPress(marker);
            }
            if (marker.OnLongPress != null)
            {
                allowMapLongPress = false;
            }
            if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)
            {
                map.tooltipMarker = marker;
                map.tooltip       = marker.label;
            }
            if (Input.GetKey(KeyCode.LeftControl))
            {
                dragMarker = marker;
            }
        }
        else
        {
            OnlineMapsDrawingElement drawingElement = map.GetDrawingElement(inputPosition);
            if (drawingElement != null)
            {
                if (drawingElement.OnPress != null)
                {
                    drawingElement.OnPress(drawingElement);
                }
                if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)
                {
                    map.tooltipDrawingElement = drawingElement;
                    map.tooltip = drawingElement.tooltip;
                }
            }
        }

        if (dragMarker == null)
        {
            isMapDrag = true;

            if (allowMapLongPress)
            {
                longPressEnumenator = WaitLongPress();
                StartCoroutine("WaitLongPress");
            }
        }
        else
        {
            lastClickTimes[0] = 0;
        }

        if (allowUserControl)
        {
            OnlineMaps.isUserControl = true;
        }
    }
    /// <summary>
    /// Method that is called when you press the map.
    /// </summary>
    protected void OnMapBasePress()
    {
        isMapPress = false;
        lockClick  = false;

        if (waitZeroTouches)
        {
            if (GetTouchCount() <= 1)
            {
                waitZeroTouches = false;
            }
            else
            {
                return;
            }
        }

        dragMarker = null;
        if (!HitTest())
        {
            return;
        }

        Vector2 inputPosition = GetInputPosition();

        if (IsCursorOnUIElement(inputPosition))
        {
            return;
        }

        if (OnMapPress != null)
        {
            OnMapPress();
        }

        lastClickTimes[0] = lastClickTimes[1];
        lastClickTimes[1] = DateTime.Now.Ticks;

        bool hit = GetCoords(out lastPositionLng, out lastPositionLat);

        lastInputPosition = pressPoint = inputPosition;
        if (!hit)
        {
            return;
        }

        isMapPress = true;

        OnlineMapsMarkerBase     marker         = null;
        OnlineMapsDrawingElement drawingElement = null;

        IOnlineMapsInteractiveElement interactiveElement = GetInteractiveElement(inputPosition);

        if (interactiveElement != null)
        {
            if (interactiveElement is OnlineMapsMarkerBase)
            {
                marker = interactiveElement as OnlineMapsMarkerBase;
            }
            else if (interactiveElement is OnlineMapsDrawingElement)
            {
                drawingElement = interactiveElement as OnlineMapsDrawingElement;
            }
        }

        if (marker != null)
        {
            if (marker.OnPress != null)
            {
                marker.OnPress(marker);
            }
            if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)
            {
                OnlineMapsTooltipDrawerBase.tooltipMarker = marker;
                OnlineMapsTooltipDrawerBase.tooltip       = marker.label;
            }
            if (Input.GetKey(KeyCode.LeftControl))
            {
                dragMarker = marker;
            }
        }
        else if (drawingElement != null)
        {
            if (drawingElement.OnPress != null)
            {
                drawingElement.OnPress(drawingElement);
            }
            if (map.showMarkerTooltip == OnlineMapsShowMarkerTooltip.onPress)
            {
                OnlineMapsTooltipDrawerBase.tooltipDrawingElement = drawingElement;
                OnlineMapsTooltipDrawerBase.tooltip = drawingElement.tooltip;
            }
        }

        if (dragMarker == null)
        {
            isMapDrag = true;
        }

        activeElement = interactiveElement;

        longPressEnumenator = WaitLongPress();
        StartCoroutine(longPressEnumenator);

        if (allowUserControl)
        {
            OnlineMaps.isUserControl = true;
        }
    }