原文 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. keil c51 本變數型態(Variable Type)

    本變數型態(Variable Type): 類 別 符號位元 位元組(bytes) 表 示 法 數 值 範 圍 整 數 有 2 int(short) -32768~0~>32767 4 long ...

  2. 关于php-fpm通讯时没有REQUEST_METHOD的问题

    nginx是通过fastcgi协议来和php通讯的!而php-fpm就扮演了这样的角色 fastcgi协议 中文版http://blog.chinaunix.net/uid-380521-id-241 ...

  3. (DP)Best Time to Buy and Sell Stock

    题目: Say you have an array for which the ith element is the price of a given stock on day i. If you w ...

  4. HTTP缓存 1.0 vs 1.1

    在“使用ETag跟踪用户”中有一点被忽略了,因为要用这张小图统计统计uv, 所以要求浏览器必须每次都要发送这个图片的请求.这需要服务器对图片的缓存策略做设置. http/1.0 和 http/1.1 ...

  5. python json基础学习01

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' import json #全称(javascript object  ...

  6. qt QSortFilterProxyModel

    # -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.Qt import * from PyQt4. ...

  7. Hibernaate事务管理

    Hibernate使用session时需要继承HibernateDaoSupport对象 HibernateDaoSupport对象中包含默认的getSession()方法,但不可以通过该方法直接启动 ...

  8. 高仿拉手网底部菜单实现FragmentActivity+Fragment+RadioGroup

    先把欢迎页和引导页的代码上传了http://download.csdn.net/detail/u013134391/7183787不要积分的. 底部菜单条实如今4.0曾经都是用tabhost.如今基本 ...

  9. LeetCode227:Basic Calculator II

    Implement a basic calculator to evaluate a simple expression string. The expression string contains ...

  10. Android应用程序发送广播(sendBroadcast)的过程分析

    文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6744448 前面我们分析了Android应用程 ...