原文 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. vs 自动生成core dump文件

    一直以来觉着core dump这个东西很神奇,在初步学习的时候也没有个大方向,最近项目需要记录程序崩溃时的日志信息,因此在网上寻找相关的信息,此时core dump也成为了我重点关注的东西. 说说我的 ...

  2. mybatis常用操作

    一.增 1.1 单条 <insert id="addUser" parameterType="com.xxx.model.UserInfo" useGen ...

  3. UML建模工具-火龙果软件

     官网地址:http://code.uml.com.cn/index.asp     Bridge桥梁模式    (待逆向) 桥梁模式,通过增加一个类,将抽象部分与它的实现部分分离,使它们都可以独立 ...

  4. GIT入门篇-基本概念与操作

    GIT 首先必须说明的是, 这篇文章不是阐述GIT原理性和比较深入的文章.只是对于日常开发中比较常用的需求的总结和GIT这些命令大体的原理解释.所以掌握这个只能说能够应付一定的开发需求.但是如果你是个 ...

  5. 【CF 549G Happy Line】排序

    题目链接:http://codeforces.com/problemset/problem/549/G 题意:给定一个n个元素的整数序列a[], 任意时刻对于任一对相邻元素a[i-1]. a[i],若 ...

  6. phpWeb

    Ruby on Rails框架在REST走得很前,开发时默认都按照RESTful风格搭建. <RESTful Web Services>是本好书 SOAP

  7. 单链表之C++实现

    在实现单链表时要注意对单链表的逻辑存储.物理存储有清晰的概念. 如上图链表已经完成,其逻辑结构如上.当需要对其进行操作,比如插入.删除,通常需要引 入指针,如上的ptr1.ptr2.在编程时一定要注意 ...

  8. python练习linux下创建路径

    #coding=utf-8 import os class MakeDirectory(): def mkdir(self,path): # 去除首位空格 path=path.strip() # 去除 ...

  9. python 给lambda命名(网友处学习)

    from os import * def set_name(**k): assert len(k)==1 name,obj=k.items()[0] obj.func_name=name return ...

  10. JUnit4中的测试套件

    测试套件 JUnit3.8中,用测试套件同时运行多个测试类(http://www.cnblogs.com/mengdd/archive/2013/04/07/3006265.html). 在JUnit ...