• 大小: 1.72MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-31
  • 语言: C#
  • 标签: c#  缓冲区  GIS  多边形  

资源简介

点和线多边形缓冲区,c#编写代码,可以使用在目前流行的瓦片地图API中。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightApplication1
{
    public partial class App : Application
    {

        public App()
        {
            this.Startup += this.Application_Startup;
            this.Exit += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;

            InitializeComponent();
        }

        private void Application_Startup(object sender StartupEventArgs e)
        {
            this.RootVisual = new MainPage();
        }

        private void Application_Exit(object sender EventArgs e)
        {

        }

        private void Application_UnhandledException(object sender ApplicationUnhandledExceptionEventArgs e)
        {
            // 如果应用程序是在调试器外运行的,则使用浏览器的
            // 异常机制报告该异常。在 IE 上,将在状态栏中用一个 
            // 黄色警报图标来显示该异常,而 Firefox 则会显示一个脚本错误。
            if (!System.Diagnostics.Debugger.IsAttached)
            {

                // 注意: 这使应用程序可以在已引发异常但尚未处理该异常的情况下
                // 继续运行。 
                // 对于生产应用程序,此错误处理应替换为向网站报告错误
                // 并停止应用程序。
                e.Handled = true;
                Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
            }
        }

        private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
        {
            try
            {
                string errorMsg = e.Exceptionobject.Message + e.Exceptionobject.StackTrace;
                errorMsg = errorMsg.Replace(‘“‘ ‘\‘‘).Replace(“\r\n“ @“\n“);

                System.Windows.Browser.HtmlPage.Window.Eval(“throw new Error(\“Unhandled Error in Silverlight Application “ + errorMsg + “\“);“);
            }
            catch (Exception)
            {
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-06-07 11:33  SilverlightApplication1\
     文件         306  2011-04-28 12:13  SilverlightApplication1\App.xaml
     文件        2363  2011-04-28 12:13  SilverlightApplication1\App.xaml.cs
     目录           0  2011-04-28 12:13  SilverlightApplication1\Bin\
     目录           0  2011-06-07 09:33  SilverlightApplication1\Bin\Debug\
     文件        1692  2011-06-07 09:36  SilverlightApplication1\Bin\Debug\AppManifest.xaml
     文件       51064  2010-05-11 17:12  SilverlightApplication1\Bin\Debug\Microsoft.Maps.MapControl.Common.dll
     文件       59304  2010-09-14 15:12  SilverlightApplication1\Bin\Debug\Microsoft.Maps.MapControl.ExtendedModes.dll
     文件      321400  2010-05-11 17:12  SilverlightApplication1\Bin\Debug\Microsoft.Maps.MapControl.dll
     文件       19736  2010-12-16 09:28  SilverlightApplication1\Bin\Debug\Microsoft.Maps.Plugins.dll
     文件       27160  2010-12-16 09:27  SilverlightApplication1\Bin\Debug\Microsoft.Maps.Plugins.xml
     文件       18944  2011-06-07 11:32  SilverlightApplication1\Bin\Debug\SilverlightApplication1.dll
     文件       54784  2011-06-07 11:32  SilverlightApplication1\Bin\Debug\SilverlightApplication1.pdb
     文件      377011  2011-06-07 11:32  SilverlightApplication1\Bin\Debug\SilverlightApplication1.xap
     文件        2870  2011-06-07 11:32  SilverlightApplication1\Bin\Debug\SilverlightApplication1TestPage.html
     文件       75656  2010-08-26 02:17  SilverlightApplication1\Bin\Debug\System.ComponentModel.DataAnnotations.dll
     文件       78184  2011-01-14 14:13  SilverlightApplication1\Bin\Debug\System.ServiceModel.DomainServices.Client.Web.dll
     文件      118026  2011-01-14 14:09  SilverlightApplication1\Bin\Debug\System.ServiceModel.DomainServices.Client.Web.xml
     文件      175464  2011-01-14 14:13  SilverlightApplication1\Bin\Debug\System.ServiceModel.DomainServices.Client.dll
     文件      404037  2011-01-14 14:09  SilverlightApplication1\Bin\Debug\System.ServiceModel.DomainServices.Client.xml
     文件      112512  2010-08-26 02:17  SilverlightApplication1\Bin\Debug\System.ServiceModel.Web.Extensions.dll
     目录           0  2011-04-28 12:14  SilverlightApplication1\Bin\Debug\ar\
     文件       11168  2010-08-26 05:33  SilverlightApplication1\Bin\Debug\ar\System.ComponentModel.DataAnnotations.resources.dll
     目录           0  2011-04-28 12:14  SilverlightApplication1\Bin\Debug\bg\
     文件       11680  2010-08-26 05:33  SilverlightApplication1\Bin\Debug\bg\System.ComponentModel.DataAnnotations.resources.dll
     目录           0  2011-04-28 12:14  SilverlightApplication1\Bin\Debug\ca\
     文件       11168  2010-08-26 05:33  SilverlightApplication1\Bin\Debug\ca\System.ComponentModel.DataAnnotations.resources.dll
     目录           0  2011-04-28 12:14  SilverlightApplication1\Bin\Debug\cs\
     文件       11168  2010-08-26 05:33  SilverlightApplication1\Bin\Debug\cs\System.ComponentModel.DataAnnotations.resources.dll
     目录           0  2011-04-28 12:14  SilverlightApplication1\Bin\Debug\da\
     文件       11168  2010-08-26 05:33  SilverlightApplication1\Bin\Debug\da\System.ComponentModel.DataAnnotations.resources.dll
............此处省略158个文件信息

评论

共有 条评论