VC++ MapWinGis篇(二)

添加高德图层(ArcGisProvider.h):

#pragma once
#include "BaseProvider.h"

class ArcGisBaseProvider: public BaseProvider
{
public:
	ArcGisBaseProvider() 
	{
		_licenseUrl = "https://mapwingis.codeplex.com/wikipage?title=baidutiles";
		int year = Utility::GetCurrentYear();
		_copyright.Format(L"Copyright @ %d, ArcGis,All Rights Reserved", year);
		this->_projection = new MercatorProjection();
		this->_maxZoom = 16;
	}
	
	CString MakeTileImageUrl(CPoint &pos, int zoom)
	{
		CString s;
		s.Format(_urlFormat, zoom, pos.y, pos.x);
		return s;
	}
};

class ArcGisMapProvider: public ArcGisBaseProvider
{
public:
	ArcGisMapProvider() 
	{
		Id = tkTileProvider::ArcGisMap;
		Name = "ArcGisMap";
		_urlFormat = "http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer/tile/%d/%d/%d";
		_subProviders.push_back(this);

		// ESRI_StreetMap_World_2D_MapProvider
		/*
			http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer/tile/3/0/2
		*/

		// ArcGIS_Imagery_World_2D_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_StreetMap_World_2D_MapProvider 
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/tile/3/0/2
		*/
		
		// ArcGIS_ShadedRelief_World_2D_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_ShadedRelief_World_2D/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_Topo_US_2D_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_World_Physical_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_World_Shaded_Relief_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_World_Street_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_World_Terrain_Base_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{0}/{1}/{2}
		*/

		// ArcGIS_World_Topo_MapProvider
		/*
			http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{0}/{1}/{2}
		*/
	}
};

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值