原文 http://www.cnblogs.com/thinkaspx/archive/2012/11/07/2759079.html

//本篇博客仅在技术上探讨可行性

  //如果要使用Q 地图,请联系相关厂商
  public class QQMapLayer : TiledMapServiceLayer
{
private const double cornerCoordinate = 20037508.342787;
public override void Initialize()
{ this.FullExtent = new ESRI.ArcGIS.Client.Geometry.Envelope(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787)
{
SpatialReference = new SpatialReference()
};
// This layer's spatial reference
this.SpatialReference = new SpatialReference();
// Set up tile information. Each tile is 256x256px, 19 levels.
this.TileInfo = new TileInfo()
{
Height = ,
Width = ,
Origin = new MapPoint(-cornerCoordinate, cornerCoordinate) { SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference() },
Lods = new Lod[]
};
// Set the resolutions for each level. Each level is half the resolution of the previous one.
double[] resolution = new double[]
{
156543.033928,
78271.5169639999,
39135.7584820001,
19567.8792409999,
9783.93962049996,
4891.96981024998,
2445.98490512499,
1222.99245256249,
611.49622628138,
305.748113140558,
152.874056570411,
76.4370282850732,
38.2185141425366,
19.1092570712683,
9.55462853563415,
4.77731426794937,
2.38865713397468,
1.19432856685505,
0.597164283559817,
0.298582141647617
};//cornerCoordinate * 2 / 256;//
for (int i = ; i < TileInfo.Lods.Length; i++)
{
//TileInfo.Lods[i] = new Lod() { Resolution = Math.Pow(2, 18 - i) };
TileInfo.Lods[i] = new Lod() { Resolution = resolution[i] }; } // Call base initialize to raise the initialization event
base.Initialize();
}
private string[] _subDomains = new string[] { "p0", "p1", "p2", "p3" };
private int[] scope = new int[] { , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , };
public override string GetTileUrl(int level, int row, int col)
{
var subdomain = this._subDomains[(level + col + row) % this._subDomains.Length]; string baseUrl = "http://{0}.map.qq.com/maptiles/{1}";
//
var f = level * ;
if (f == this.scope.Length) return "";
var i = this.scope[f++]; var j = this.scope[f++]; var l = this.scope[f++]; var scope = this.scope[f]; var tileNo = ""; if (col >= i && col <= j && row >= l && row <= scope)
{ row = (int)(Math.Pow(, level) - - row); tileNo = level + "/" + Math.Floor(col / ) + "/" + Math.Floor(row / ) + "/" + col + "_" + row + ".png"; } return string.Format(baseUrl, subdomain, tileNo);
}
}

Arcgis api For silverlight 加载QQ地图的更多相关文章

  1. ArcGIS API for Silverlight 加载google地图

    原文:ArcGIS API for Silverlight 加载google地图 using System; using System.Net; using System.Windows; using ...

  2. ArcGIS API for Silverlight加载google地图(后续篇)

    原文:ArcGIS API for Silverlight加载google地图(后续篇) 之前在博客中(http://blog.csdn.net/taomanman/article/details/8 ...

  3. Arcgis api For silverlight 加载高德地图

    原文 http://www.cnblogs.com/thinkaspx/archive/2012/11/13/2767752.html 地图仅供演示,研究使用.如要商用 请联系厂商. public c ...

  4. 解决ArcGIS API for Silverlight 加载地图的内外网访问问题

    原文:解决ArcGIS API for Silverlight 加载地图的内外网访问问题 先上一个类,如下: public class BaseClass { public static string ...

  5. ArcGIS api for javascript——加载查询结果,悬停显示信息窗口

    转自原文 ArcGIS api for javascript——加载查询结果,悬停显示信息窗口 描述 本例在开始和地图交互前执行一个查询任务并加在查询结果.这允许用户鼠标悬停在任意郡县时立即见到Inf ...

  6. OpenLayers加载QQ地图(转)

    OpenLayers加载QQ地图 http://www.openlayers.cn/portal.php?mod=view&aid=4 2012-10-21 17:22| 发布者: admin ...

  7. ArcGIS API for Javascript 加载天地图(经纬度投影)

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  8. ArcGIS API for Javascript 加载天地图(墨卡托投影)

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  9. arcgis api for javascipt 加载天地图、百度地图

    写在前面的话: 1.百度地图是自己定义的坐标系统,wkid=102100.百度地图数据是加密的产物.下文将附上百度坐标与WGS84,谷歌等坐标系统转换方法(地理-地理),此方法并未亲测,据说准 2.百 ...

随机推荐

  1. Ubuntu 14.04远程登录服务器--openssh的安装和配置简明步骤

    如果要主机通过网络操作嵌入式板子,ttelnet就够了,但是 如果要相互传文件,则必须使用另外一个强大的软件SSH.更完整的步骤和截图请参考http://jingyan.baidu.com/artic ...

  2. 2B相对来说,早期它的成长速度不会像2C那么快

    叶冠泰:今天我们是在场比较少数的2B的公司,你能不能给创业者一些分享,你觉得2B跟2C的差别是什么,我们要怎样发展? 蒋韬:这可能跟性格有关系,我的性格可能更适合去做2B的业务. 对于做2B业务的创业 ...

  3. makefile例子《一》

    一.例子 (1)makefile和src源文件不在同一目录下 (2)把.o生成到指定目录下 文件结构目录 ----inc      //放头文件 ----lib //放所需要的.a或者.so文件 -- ...

  4. AngularJS 2调用.net core WebAPI的几个坑

    前几天,按照AngularJS2的英雄指南教程走了一遍,教程网址是http://origin.angular.live/docs/ts/latest/tutorial/. 在步骤完成后,又更进一步,在 ...

  5. 话说GET与POST那点恩怨

    看过很多人写GET和POST之间的区别,为什么这么多人关注它们呢?因为它们是最常用的两种HTTP方法,之间有很多相同之处,也存在非常大的不同.首先了解一下HTTP方法: 什么是HTTP?     超文 ...

  6. java与.net比较学习系列(4) 运算符和表达式

    上一篇总结了java的数据类型,得到了冰麟轻武等兄弟的支持,他们提出并补充了非常好的建议,在这里向他们表示感谢.在后面的文章中,我会尽力写得更准确和更完善的,加油! 另外,因为C#是在java之后,也 ...

  7. [RxJS] Reactive Programming - Why choose RxJS?

    RxJS is super when dealing with the dynamic value. Let's see an example which not using RxJS: var a ...

  8. 在OC和Swift中使用IBDesignable/IBInspectable

    iOS8新特性IBDesignable/IBInspectable,可以直接在XIB或者Storyboard中直接,设置UI类的属性.例 如:UIView.layer.borderWidth.bord ...

  9. configure交叉编译

    今天在交叉编译时犯了一个错误,纠结了好久,曾经交叉编译器的前缀基本上都是用arm-linux-,这次换了一个新环境是arm-none-linux-gnueabi-,于是想当然的把configure中的 ...

  10. Spring项目的建立-移植流程(非入门教程)

    Creat by Zhou yong in 2016/4/15/19:00 jar包 java 1.7 tomcat的两个jar包 2个文件上传的jar包 json支持的jar包 hibernate- ...