SuperMap IClient for Leaflet 加载高斯克吕格投影三度分带CGCS2000大地坐标系WMTS服务
生活随笔
收集整理的這篇文章主要介紹了
SuperMap IClient for Leaflet 加载高斯克吕格投影三度分带CGCS2000大地坐标系WMTS服务
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
SuperMap IClient for Leaflet 加載高斯克呂格投影三度分帶CGCS2000大地坐標系WMTS服務
- 難點所在
- 加大帶號高斯克呂格投影三度分帶CGCS2000大地坐標系
- 不加大帶號高斯克呂格投影三度分帶CGCS2000大地坐標系
難點所在
Leaflet加載WMTS服務(球面)的是很簡單的,但是加載投影坐標系的一直以來比較迷惑,故此,寫出來最常用的情況。
關于數據的說明:
采用的數據是江蘇片區的影像數據;
關于版本的說明:
SuperMap IClient for Leaflet 10 i http://iclient.supermap.io/examples/leaflet/examples.html
加大帶號高斯克呂格投影三度分帶CGCS2000大地坐標系
<!DOCTYPE HTML> <html> <head><meta charset="UTF-8"><title>wmts</title><link href="leaflet2/css/leaflet.css" rel="stylesheet"><script type="text/javascript" src="../js/include-web.js"></script><script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script><script type="text/javascript" src="../js/proj4leaflet.js"></script><style>html,body{height: 100%;width: 100%;}#map{height: 100%;width: 100%;}</style> </head> <body><div id="map"></div> <script>var res = [];for (var i = 0; i < 17; i++) {res.push(52.91666666666665 / (Math.pow(2, i)));}// Proj4js.defs("EPSG:4528","+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");var map = L.map('map', {center: [31.79,119.45],maxZoom: 6,zoom: 1,crs: new L.Proj.CRS("EPSG:4528","+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=GRS80 +units=m +no_defs",{origin: [40444190.4, 3523180.2],resolutions: res,bounds: L.bounds([40444190.4,3515218.5], [40456694.1,3523180.2])})});L.supermap.wmtsLayer("http://192.168.60.45:8099/iserver/services/map-ugcv5-JTclip03gk/wmts100",{layer: "JT_clip_03_gk",style: "default",tilematrixSet: "Custom_JT_clip_03_gk",format: "image/png",requestEncoding: 'REST'}).addTo(map); </script> </body> </html>不加大帶號高斯克呂格投影三度分帶CGCS2000大地坐標系
<!DOCTYPE HTML> <html> <head><meta charset="UTF-8"><title>wmts</title><link href="leaflet2/css/leaflet.css" rel="stylesheet"><script type="text/javascript" src="../js/include-web.js"></script><script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script><script type="text/javascript" src="../js/proj4leaflet.js"></script><style>html,body{height: 100%;width: 100%;}#map{height: 100%;width: 100%;}</style> </head> <body><div id="map"></div> <script>var res = [];for (var i = 0; i < 7; i++) {res.push(52.91666666666665 / (Math.pow(2, i)));}// proj4.defs("EPSG:4549","+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");var map = L.map('map', {center: [31.75844328613281,119.41046761484614],maxZoom: 6,zoom: 0,crs: new L.Proj.CRS("EPSG:4549","+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs",{origin: [444190.4,3523180.2],resolutions: res,bounds: L.bounds([444190.4,3515218.5], [456694.1,3523180.2]),dpi:90.7142857142857})});L.supermap.wmtsLayer("http://192.168.60.45:8099/iserver/services/map-ugcv5-JTclip03gkndh/wmts100",{layer: "JT_clip_03_gk_ndh",style: "default",tilematrixSet: "Custom_JT_clip_03_gk_ndh",format: "image/png",requestEncoding: 'REST'}).addTo(map); </script> </body> </html>總結
以上是生活随笔為你收集整理的SuperMap IClient for Leaflet 加载高斯克吕格投影三度分带CGCS2000大地坐标系WMTS服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在大公司天天调参数,感觉快废了~
- 下一篇: 芯片公司急聘嵌入式软件精英人才