Ejemplo n.º 1
0
        /// <summary>
        /// Returns the maximum speed.
        /// </summary>
        public virtual float MaxSpeedAllowed(IAttributeCollection tags)
        {
            float speed = 5;

            // get max-speed tag if any.
            if (tags.TryGetMaxSpeed(out speed))
            {
                return(speed);
            }

            string highwayType;

            if (TryGetHighwayType(tags, out highwayType))
            {
                speed = this.MaxSpeedAllowed(highwayType);
            }

            return(speed);
        }