惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
T
Threatpost
G
Google Developers Blog
T
Threat Research - Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
Hacker News: Ask HN
Hacker News: Ask HN
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Schneier on Security
B
Blog
V2EX - 技术
V2EX - 技术
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
N
News | PayPal Newsroom
Attack and Defense Labs
Attack and Defense Labs
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
S
Security @ Cisco Blogs
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
Project Zero
Project Zero
I
Intezer
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler

博客园 - 胡敏

WebSharp 3.0(个人修订版)全代码,WebSharp 的作者已经抛弃它了吗?(一个国产ORM框架) 从追MM谈Java的23种设计模式 - 太经典了,转到自己的BLOG上收藏着先 利用.net创建安全COM控件 AutoCAD二次开发之创建菜单 我的家——三维地图 一个数独问题的算法(已更新,提供一个简单算法,欢迎拍砖) 生活在垃圾网络中,我们该怎么办? vs.net 2005 中文版下载 c#调用des64.dll进行加密解密 - 胡敏 - 博客园 MapXtreme 2004 6.2 中文版破解文件及安装方法(已经不提供下载) 提供MapXtreme 2004 6.2 NCP破解文件及安装方法(已经不能提供了,等待破解最新的吧) 爆笑经典签名 一句话经典笑话 MapXtreme2004初学者资料(整理) 移动用户查询手机开通的服务 使用 Rational XDE for .net建模和设计数据库(原创) 自己动手注册xde for .net帮助 如何得到别人收藏夹里的网址 十种你不知道的东西,绝对经典(如果你知道就不用点了,该休息了)(转)
MapXtreme2004新手资料续
胡敏 · 2005-10-27 · via 博客园 - 胡敏

1.从ORACLE表中加载图层的问题。。。
MIConnection Connection=new MIConnection();
Connection.Open();
TableInfoServer tis1=new TableInfoServer("WORLD",
   "SRVR=ora8i;UID=wzz;PWD=11111111",
   "select * from world",MapInfo.Data.ServerToolkit.Oci);
MapInfo.Data.Table [] tables=new MapInfo.Data.Table[2];
tables[0]=Connection.Catalog.OpenTable(tis1);
  TableInfoServer tis2=new TableInfoServer("WORLDCAP",
  "SRVR=ora8i;UID=wzz;PWD=11111111",
  "select * from worldcap",MapInfo.Data.ServerToolkit.Oci);
tables[1]=Connection.Catalog.OpenTable(tis2);
MapControl1.Map.Load(new MapInfo.Mapping.MapTableLoader(tables));

2.存在SqlSever中XY坐标点的绑定代码
//XY绑定:含有x,y坐标点的图层放置在Sql Server数据库中,按xy坐标生成点图层
//1.要在存在该表的数据库中建立MAPINFO_MAPCATALOG表,否则会报错:
//"An unhandled exception of type 'MapInfo.Data.TableException' occurred in mapinfo.coreengine.dll.
//Additional information: 不能打开表。 ODBC 错误: ODBC RC=-1, ODBC SQLState=S0002, DBMS RC=208, DBMS Msg=[Microsoft][ODBC SQL Server Driver][SQL Server]对象名 'MAPINFO.MAPINFO_MAPCATALOG' 无效。
//2.要含xy坐标点的表建立主键,否则会报错:
//"Additional information: 不能打开表。因为不能识别唯一键,不能访问远程数据。"

   //建立XY空间方案
   MapInfo.Data.SpatialSchemaXY xy = new MapInfo.Data.SpatialSchemaXY();
   xy.XColumn = "X";
   xy.YColumn = "Y";
   xy.NullPoint = "0.0, 0.0";
   xy.StyleType = MapInfo.Data.StyleType.None;
   xy.DefaultStyle = new MapInfo.Styles.CompositeStyle();
   xy.CoordSys = MapInfo.Engine.Session.Current.CoordSysFactory.CreateLongLat(MapInfo.Geometry.DatumID.WGS84);

   //建立TableInfo
   MapInfo.Data.TableInfoServer ti = new MapInfo.Data.TableInfoServer("Customers","Driver={SQL Server};Server=LIXIAOHUI;Database=test;Uid=sa;Pwd=sa;","select * from Us_Cust",MapInfo.Data.ServerToolkit.Odbc);
   ti.SpatialSchema = xy;
   MapInfo.Data.Table miCustomers = MapInfo.Engine.Session.Current.Catalog.OpenTable (ti);
   MapInfo.Mapping.FeatureLayer featureLayer = new MapInfo.Mapping.FeatureLayer(miCustomers);
   mapControl1.Map.Layers.Add(featureLayer);
   mapControl1.Map.SetView(featureLayer);

3.如何查看整个地图
Map map = mapControl1.Map;
IMapLayerFilter lyrFilter = MapLayerFilterFactory.FilterByType(typeof(FeatureLayer));
MapLayerEnumerator lyrEnum= map.Layers.GetMapLayerEnumerator(lyrFilter);
map.SetView(lyrEnum);
或者:
   Map map = mapControl1.Map;
   IMapLayerFilter lyrFilter = new FilterByLayerType(LayerType.Normal);
   MapLayerEnumerator lyrEnum= map.Layers.GetMapLayerEnumerator(lyrFilter);
   map.SetView(lyrEnum);