摘要: 绘制的图形 已经保存在featuresLayer中,下面是关键代码 GeoRegion region = (featuresLayer.Features[0].Geometry as GeoRegion); ObservableCollection<Point2D> regionPtn = region.Parts.First(); coords = ""; foreach (Point2D ptn in regionPtn) { coords += "(... 阅读全文
posted @ 2011-08-24 16:28 千禧牛 阅读(388) 评论(0) 推荐(0)
摘要: /// <summary> /// 坐标范围定位 /// </summary> /// <param name="coords"></param> public void ZoomTo(string coords) { featuresLayer.Features.Clear(); string[] coordArr = coords.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries)... 阅读全文
posted @ 2011-08-24 16:25 千禧牛 阅读(779) 评论(0) 推荐(1)
摘要: 由于silverlight运行在客户端,我们只能模拟出session 首先定义一个SessionManager类using System;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Ink;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Win 阅读全文
posted @ 2011-08-24 16:19 千禧牛 阅读(474) 评论(0) 推荐(0)
摘要: 1.javascript调用silverlight 首先在silverlight的C#代码中定义一个public方法 /// <summary> /// 地图查询 /// </summary> /// <param name="keyword"></param> [ScriptableMember] public void QuerySQL(string keyword) { myMapTools.QuerySQL(keyword); }并且该类的头部 加属性 ... 阅读全文
posted @ 2011-08-24 16:06 千禧牛 阅读(463) 评论(0) 推荐(0)
摘要: 首先在包含webbrower控件的窗体 类中加上下面的属性 [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] [System.Runtime.InteropServices.ComVisibleAttribute(true)] 然后在Frm_Load里面加入 webBrowser1.ObjectForScr... 阅读全文
posted @ 2011-08-24 15:47 千禧牛 阅读(668) 评论(0) 推荐(0)