ArcGIS Web API 接入天地图瓦片
来源:互联网 发布:sql注入布尔型攻击 编辑:程序博客网 时间:2024/05/18 09:09
接入天地图的瓦片完全类似google的瓦片服务,但是空间参考不一致,想叠加其他的数据的话需要注意空间参考的设置,以上三篇博客的目的为简单的技术研究,如果想将这些内容用于商业用途,大家还是要联系厂家啊!
publicclasstianditu :TiledMapServiceLayer
{
publicstring _mapType =null;
privatestring[] _hosts =new
string[] { “tile0″,
“tile1″, “tile2″,
“tile3″, “tile4″,
“tile5″, “tile6″,
“tile6″, “tile7″
};
publicoverridevoid
Initialize()
{
this.FullExtent
= new
ESRI.ArcGIS.Client.Geometry.Envelope(180,-90,-180,90); {
SpatialReference =newESRI.ArcGIS.Client.Geometry.SpatialReference(4326);
};
this.SpatialReference
= new
ESRI.ArcGIS.Client.Geometry.SpatialReference(4326);
this.TileInfo
= new TileInfo()
{
Height = 256,
Width = 256,
Origin =new
ESRI.ArcGIS.Client.Geometry.MapPoint(-90d,45d) {
SpatialReference = new
ESRI.ArcGIS.Client.Geometry.SpatialReference(4326)
},
Lods =new
Lod[18]
};
double
resolution = 0.3515625;
for (int i = 0; i <TileInfo.Lods.Length; i++)
{
TileInfo.Lods[i] =new Lod() { Resolution = resolution };
resolution /= 2;
}
base.Initialize();
}
publicoverridestring
GetTileUrl(int level,int
row, int col)
{
int
index = Math.Abs(col % 7);
string
host = _hosts[index];
string
url=“”;
if(_mapType==
“map”)
{
if
(level < 10)
{
url=string.Format(“http://{0}.tianditu.com/DataServer?T=A0512_EMap&X={1}&Y={2}&L={3}”,
host, col, row, level+1);
}
else
if (level < 12)
{
url=string.Format(“http://{0}.tianditu.com/DataServer?T=B0627_EMap1112&X={1}&Y={2}&L={3}”,
host, col, row, level+1);
}
else
{
url=string.Format(“http://{0}.tianditu.com/DataServer?T=siwei0608&X={1}&Y={2}&L={3}”,
host, col, row, level+1);
}
}
if
(_mapType == “Vanno”)
{
if
(level < 10)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=AB0512_Anno&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
}
if
(_mapType == “img”)
{
if
(level < 10)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=sbsm0210&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
else
if (level == 10)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=e11&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
else
if (level == 11)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=e12&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
else
if (level == 12)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=e13&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
else
if (level == 13)
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=eastdawnall&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
else
{
url = string.Format(“http://{0}.tianditu.com/DataServer?T=sbsm1518&X={1}&Y={2}&L={3}”,
host, col, row, level + 1);
}
}
return
url;
}
}
- ArcGIS Web API 接入天地图瓦片
- ArcGIS Web API 接入E都市瓦片
- ArcGIS切片和天地图瓦片匹配
- ArcGIS API for Flex 调用天地图、e都市瓦片地图
- 重写ArcGIS的TiledMapServiceLayer调用天地图瓦片
- ArcGIS Flex API调用天地图
- ArcGIS Silverlight API访问天地图服务
- arcgis api for android 叠加天地图
- ArcGIS Silverlight API访问天地图服务
- ArcGIS Silverlight API访问天地图服务
- ArcGIS API for JavaScript加载天地图
- ArcGIS API FOR JS 加载天地图
- ArcGIS Silverlight API访问天地图服
- ArcGIS WebAPI接入google瓦片服务
- ArcGIS API for Silverlight中加载Google地形图(瓦片图
- ArcGIS Flex API 调用天地图和Google地图服务
- ArcGIS Flex API 调用天地图和Google地图服务
- ArcGis Javascript API (V3.6)加载天地图
- windows和linux(ubuntu13.04)双系统安装教程
- java访问远程共享文件
- Windows编程-1-字符和字符串处理相关知识点总结
- 黑马程序员_两种遍历集合的方法Iterator接口和foreach循环
- 批量SSH key-gen无密码登陆认证脚本
- ArcGIS Web API 接入天地图瓦片
- 返回select行數
- 指针篇之十一 函数指针
- Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before
- 推荐给大家一个php代码格式化在线工具
- “ImageCLEF 2012 plant overview” 摘要
- linux tar
- 七个习惯
- Would You Like a Shave or a Haircut?