Beispiel #1
0
        private void getData_Btn_Click(object sender, EventArgs e)
        {
            string lat = coordLat_TxtBx.Text;
            string lng = coordLng_TxtBx.Text;
            double latD, lngD, sizeD;

            try
            {
                latD  = double.Parse(lat);
                lngD  = double.Parse(lng);
                sizeD = double.Parse(size_TxtBx.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: Check if coordinate values and bounding box are correct.");
                return;
            }
            try
            {
                latD  = double.Parse(lat);
                lngD  = double.Parse(lng);
                sizeD = double.Parse(size_TxtBx.Text);
                LoadProvider(latD, lngD, sizeD);
                MessageBox.Show("Completed");
                AutoCAD_Methods.ZoomExtents();
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Generates the data from the address
        /// </summary>
        /// <param name="layer">layer name of the data: </param>
        /// <param name="lat"></param>
        /// <param name="lng"></param>
        /// <param name="size"></param>
        public virtual void DrawXmlData(double lat, double lng, double size)
        {
            string     layer = "layer-772";
            XmlWfsData parcel;
            string     url     = WfsRequestUrl(layer, lat, lng, size);
            XDocument  xmlData = GetXML(url);
            XNamespace wfs     = "http://www.opengis.net/wfs/2.0";

            foreach (XElement element in xmlData.Descendants(wfs + "member"))
            {
                parcel = GetParcelDataFromXml(element);
                AutoCAD_Methods.DrawPlineFrom2PtList("LinzParcel", parcel.PosList);
                AutoCAD_Methods.DrawLabelsInPoly(parcel.PosList, parcel.string1, parcel.string2);
            }
        }