1.ArcMap加载WMTS服务
(1).打开ArcMap找到如下功能双击打开
(2).在打开的窗体中输入你需要连接的WMTS服务服务地址,此处注意地址应该填写获取元数据的地址应增加以下参数(具体参数说明请自行百度 WMTS规范)
request=GetCapabilities&service=wmts
2.ArcGIS Engine加载WMTS服务,参考以下代码,url与上述arcmap中一致
public void AddWMTSLayer(string url)
{
IPropertySet propertyset = new PropertySetClass();
//url地址为加参数 “request=GetCapabilities&service=wmts” 后的地址
propertyset.SetProperty("url", url);
IWMTSConnectionFactory wmtsConnectionfactory = new WMTSConnectionFactory();
IWMTSConnection wmtsConnection = wmtsConnectionfactory.Open(propertyset, 0, null);
IWMTSLayer wmtsLayer = new WMTSLayer();
IName fullName = wmtsConnection.FullName;
wmtsLayer.Connect(fullName);
this.axMapControl1.AddLayer(wmtsLayer as ILayer);
this.axMapControl1.Refresh();
}