Ejemplo n.º 1
0
        public void PlIntilizationUserString()
        {
            string expected = "pl=";
            Pl     Pl       = new Pl("UserString");

            expected += "UserString";
            Assert.AreEqual(expected, Pl.GetPartUrl());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Получить URL на изображение
        /// </summary>
        /// <returns></returns>
        public string GetPictureURL()
        {
            string str = "";

            str += URL;
            str += _l.GetPartUrl() + "&";
            if (_bbox == null)
            {
                if (_ll != null)
                {
                    str += _ll.GetPartUrl() + "&";
                }
                if (_spn != null)
                {
                    str += _spn.GetPartUrl() + "&";
                }
                if (_z >= 0)
                {
                    str += "z=" + _z + "&";
                }
            }
            else
            {
                str += _bbox.GetPartUrl() + "&";
            }

            if (_size != null)
            {
                str += _size.GetPartUrl() + "&";
            }

            if (_scale != -1)
            {
                if (_l.Sat == false)//Для спутника масштабирование запрещенно
                {
                    str += "scale=" + _scale.ToString().Replace(",", ".") + "&";
                }
            }

            if ((_lang != null) && (_lang._language_region != Lang.Lang_reg.none))
            {
                str += _lang.GetPartUrl() + "&";
            }

            if (_pt != null)
            {
                str += _pt.GetPartUrl() + "&";
            }
            if (_pl != null)
            {
                str += _pl.GetPartUrl() + "&";
            }

            str = str.TrimEnd('&');

            return(str);
        }