ArcEngine10.1 CS端加載WMTS圖層

using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.GISClient;
using ESRI.ArcGIS.Carto;

public class MapWMTSLayer
{
    public IWMTSLayer GetWMTSLayer(string location)
    {
        IPropertySet pPropertyset = new PropertySetClass();
        pPropertyset.SetProperty("url", location);
        IWMTSConnectionFactory pwmtsconnectionfactory = new WMTSConnectionFactory();
        IWMTSConnection con = pwmtsconnectionfactory.Open(pPropertyset, 0, null);
        IWMTSLayer ly = new WMTSLayer();
        IName n = con.FullName;
        ly.Connect(n);
        return ly;
    }
}


測試圖層:

http://t0.tianditu.com/vec_c/wmts


加載結果:



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章