예제 #1
0
        public IGPSBounds RelevantArea()
        {
            IGPSBounds area = null;

            if (m_TrailRoutes.Count > 0)
            {
                area = TrailMapPolyline.getGPSBounds(m_TrailRoutes);
            }
            if (m_TrailPoints.Count > 0)
            {
                //Normal trails all have the same radius, should not be much difference anyway
                float      highlightRadius = m_TrailPoints[0].Radius;
                IGPSBounds area2           = TrailGPSLocation.getGPSBounds(m_TrailPoints, 2 * highlightRadius);
                area = this.Union(area, area2);
            }
            if (m_SplitPoints.Count > 0)
            {
                IGPSBounds area2 = SplitGPSLocation.getGPSBounds(m_SplitPoints);
                area = this.Union(area, area2);
            }
            if (m_MarkedTrailRoutes.Count > 0 || m_MarkedTrailRoutesNoShow.Count > 0)
            {
                IGPSBounds area2 = Union(TrailMapPolyline.getGPSBounds(m_MarkedTrailRoutes),
                                         TrailMapPolyline.getGPSBounds(m_MarkedTrailRoutesNoShow));
                area = this.Union(area, area2);
            }
            return(area);
        }