TE中可以通过网络服务加载地图,常用的服务有wms,wmts等,
WMTS提供了一种采用预定义图块方法发布数字地图服务的标准化解决方案。WMTS弥补了WMS不能提供分块地图的不足。WMS针对提供可定制地图的服务,是一个动态数据或用户定制地图(需结合SLD标准)的理想解决办法。WMTS牺牲了提供定制地图的灵活性,代之以通过提供静态数据(基础地图)来增强伸缩性,这些静态数据的范围框和比例尺被限定在各个图块内。这些固定的图块集使得对WMTS服务的实现可以使用一个仅简单返回已有文件的Web服务器即可,同时使得可以利用一些标准的诸如分布式缓存的网络机制实现伸缩性。
TE支持二次开发加载wmts,代码比较简单:
ITerrainRasterLayer66 il = sgworld.Creator.CreateImageryLayer("ter.wms文件路径", -180, 90, 180, -90, 0, "", "", "ter");标签:...,1V,##,....,.....,二次开发,TE,..........,wmts From: https://blog.51cto.com/speciallist/5717782
关键是其中的.wmts如何配置,下边列举一个wmts的配置格式:
[INFO]
ProtocolType=3
ServerOptions=20000000
Meters=0
MPP=4.291534423828125e-005
Url=http://t0.tianditu.com/ter_c/wmts?request=GetTile&Version=1.0.0&Service=WMTS&Layer=ter&Style=default&Format=tiles&TileMatrixSet=c&TileMatrix=1&TileRow=0&TileCol=0
Layers=ter
CapabilitiesUrl=http://t0.tianditu.com/ter_c/wmts?
xul=-180
ylr=-89.99999999977328
xlr=179.99999999954656
yul=90
WMSCoordSys=urn:ogc:def:crs:EPSG::4490
WKT=GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4490"]]
TileInfo=000002C9Ezrv.vN......A.A......A.....................2.l.....f...1V.V#f##3##lH#nB.....A.A......C..........A..........2.l.....f...1V.V#f##3##VH#pB.....A.A......G..........C..........2.l.....f...1V.V#f##3##FH#rB.....A.A......O..........G..........2.l.....f...1V.V#f##m##2H#tB.....A.A......e..........O..........2.l.....f...1V.V#f##m##lH#vB.....A.A......#..........e..........2.l.....f...1V.V#f##m##VH#xB.....A.A....D.#..........#..........2.l.....f...1V.W#f##m##FH#zB.....A.A....L.#.........A#..........2.l.....f...1V.W#f##W##2H#2B.....A.A....L.#A........C#..........2.l.....f...1V.W#f##W##lH#4B.....A.A....L.#C........C#A.........2.l.....f...1V.W#f##W##VH#6B.....A.A....L.#G........C#C.........2.l.....f...1V.W#f##W##FH#9B.....A.A....L.#O........C#G.........2.l.....f...1V.W#f##G##2L#.B.....A.A....L.#e........C#O.........2.l.....f...1V.W#f##G##lL#CB.....A.A....L.##........C#e.........2.l.....f...1V.W#f##G##VL#FB...w..x..y.z..1..2.3..4..5.w.v.w.w.w.x.w.y.w.z..
ProtocolType为协议类型
ServerOptions服务器配置
Meters偏移
Url wmts的连接字符串
Layers 图层
CapabilitiesUrl 基础的url
xul ylr xlr yul 四至坐标范围
WMSCoordSys wkt 参考坐标系统