bool LocalMapLayer::isValidPerspective(const GeoDataLatLonBox &candidate) const
    {
        if (!mVisible || !mHasContent)
        {   //any perspective is valid if no content is showing
            return true;
        }

        GeoDataLatLonBox box = mLocalMapLogic->currentBox();
        if (!candidate.contains(box) && !candidate.intersects(box))
        {   //No relation - invalid perspective
            return false;
        }

        //Acceptable scales
        qreal d = diameter(box);
        qreal zoomOutLimit = d * 4;
        qreal zoomInLimit = d * 0.25;
        qreal dCandidate = diameter(candidate);
        if (dCandidate > zoomOutLimit || dCandidate < zoomInLimit)
        {   //Box is too big or too small
            return false;
        }

        return true;
    }