{"id":87432,"date":"2026-07-30T09:48:25","date_gmt":"2026-07-30T01:48:25","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87432.html"},"modified":"2026-07-30T09:48:25","modified_gmt":"2026-07-30T01:48:25","slug":"openlayers-%e4%b8%8e-leaflet-%e5%8a%a0%e8%bd%bd%e5%a4%a9%e5%9c%b0%e5%9b%be%e5%85%a8%e7%b3%bb%e5%9b%be%e5%b1%82%ef%bc%88%e7%9f%a2%e9%87%8f-%e5%bd%b1%e5%83%8f-%e5%9c%b0%e5%bd%a2%e5%ba%95%e5%9b%be","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87432.html","title":{"rendered":"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218"},"content":{"rendered":"<p>\u6458\u8981&#xff1a;\u5929\u5730\u56fe\u4f5c\u4e3a\u56fd\u5bb6\u5730\u7406\u4fe1\u606f\u516c\u5171\u670d\u52a1\u5e73\u53f0&#xff0c;\u63d0\u4f9b\u6807\u51c6\u7684 WMTS\u200b \u74e6\u7247\u670d\u52a1\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790\u5929\u5730\u56fe\u7684\u53cc\u6295\u5f71\u4f53\u7cfb\u4e0e\u56fe\u5c42\u5206\u5c42\u8bbe\u8ba1\u539f\u7406&#xff0c;\u5e76\u5206\u522b\u7ed9\u51fa OpenLayers&#xff08;XYZ\/WMTS\u65b9\u5f0f&#xff09;\u200b \u4e0e Leaflet\u200b \u52a0\u8f7d\u77e2\u91cf\u5e95\u56fe\u3001\u77e2\u91cf\u6ce8\u8bb0\u3001\u5f71\u50cf\u5e95\u56fe\u3001\u5f71\u50cf\u6ce8\u8bb0\u3001\u5730\u5f62\u6655\u6e32\u53ca\u5730\u5f62\u6ce8\u8bb0\u7684\u5b8c\u6574\u53ef\u8fd0\u884c\u4ee3\u7801&#xff0c;\u9644\u5e26\u5750\u6807\u7cfb\u5339\u914d\u3001Key\u914d\u7f6e\u3001\u6ce8\u8bb0\u53e0\u52a0\u987a\u5e8f\u7b49\u6838\u5fc3\u907f\u5751\u6307\u5357\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u5929\u5730\u56fe\u670d\u52a1\u539f\u7406\u4e0e\u56fe\u5c42\u4f53\u7cfb\u89e3\u6790<\/h3>\n<h4>1.1 WMTS \u670d\u52a1\u4e0e\u5206\u5c42\u8bbe\u8ba1\u539f\u7406<\/h4>\n<p>\u5929\u5730\u56fe\u9075\u5faa OGC WMTS&#xff08;Web Map Tile Service&#xff09;\u200b \u6807\u51c6&#xff0c;\u9884\u5148\u5c06\u5730\u56fe\u5207\u5272\u4e3a 256\u00d7256 \u50cf\u7d20\u7684\u6805\u683c\u74e6\u7247\u3002\u5176\u6838\u5fc3\u8bbe\u8ba1\u7279\u70b9\u662f\u5e95\u56fe\u4e0e\u6ce8\u8bb0\u5206\u79bb&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5e95\u56fe\u56fe\u5c42&#xff1a;\u627f\u8f7d\u51e0\u4f55\u56fe\u5f62&#xff08;\u9053\u8def\u3001\u5efa\u7b51\u3001\u5f71\u50cf\u7eb9\u7406&#xff09;&#xff0c;\u5982 vec&#xff08;\u77e2\u91cf&#xff09;\u3001img&#xff08;\u5f71\u50cf&#xff09;\u3001ter&#xff08;\u5730\u5f62\u6655\u6e32&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u6ce8\u8bb0\u56fe\u5c42&#xff1a;\u900f\u660e\u80cc\u666f\u7684\u6587\u5b57\u6807\u6ce8&#xff08;\u5730\u540d\u3001\u8def\u540d\u3001POI&#xff09;&#xff0c;\u5982 cva\u3001cia\u3001cta\u3002<\/p>\n<\/li>\n<li>\n<p>\u53e0\u52a0\u903b\u8f91&#xff1a;\u6ce8\u8bb0\u56fe\u5c42\u5fc5\u987b\u5177\u6709 \u900f\u660e\u5ea6&#xff08;PNG\u683c\u5f0f&#xff09;&#xff0c;\u4e14\u5728\u6e32\u67d3\u987a\u5e8f\u4e0a\u59cb\u7ec8\u7f6e\u4e8e\u5e95\u56fe\u4e4b\u4e0a&#xff0c;\u5426\u5219\u6587\u5b57\u4f1a\u88ab\u5e95\u56fe\u906e\u76d6\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>1.2 \u53cc\u6295\u5f71\u4f53\u7cfb&#xff08;\u6838\u5fc3\u5751\u70b9&#xff09;<\/h4>\n<p>\u5929\u5730\u56fe URL \u4e2d\u7684\u540e\u7f00\u51b3\u5b9a\u4e86\u5750\u6807\u7cfb&#xff0c;\u524d\u7aef View\/CRS \u5fc5\u987b\u4e25\u683c\u5339\u914d&#xff1a;<\/p>\n<ul>\n<li>\n<p>_w \u540e\u7f00&#xff08;Web \u58a8\u5361\u6258 EPSG:3857&#xff09;&#xff1a;\u6b63\u65b9\u5f62\u6295\u5f71&#xff0c;\u4e0e Google Maps\u3001OSM\u3001OpenLayers \u9ed8\u8ba4\u6295\u5f71\u4e00\u81f4&#xff0c;\u9002\u5408 Web \u7aef\u5c55\u793a\u3002<\/p>\n<\/li>\n<li>\n<p>_c \u540e\u7f00&#xff08;\u7ecf\u7eac\u5ea6 EPSG:4326&#xff09;&#xff1a;\u5355\u4f4d\u4e3a\u4e2d\u6587\u5ea6&#xff0c;\u9002\u5408 GPS\/CGCS2000 \u6570\u636e\u76f4\u63a5\u5339\u914d\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u26a0\ufe0f \u4e25\u7981\u6df7\u7528&#xff1a;EPSG:3857 \u7684 View \u4e0d\u80fd\u52a0\u8f7d _c \u7684\u74e6\u7247&#xff0c;\u5426\u5219\u4f1a\u51fa\u73b0\u4e25\u91cd\u504f\u79fb\u3002<\/p>\n<h4>1.3 \u5e38\u7528\u56fe\u5c42\u7c7b\u578b\u5bf9\u7167\u8868&#xff08;\u4ee5\u58a8\u5361\u6258 _w \u4e3a\u4f8b&#xff09;<\/h4>\n<table>\n<tr>\n<p>\u5730\u56fe\u7c7b\u578b<\/p>\n<p>\u5e95\u56fe Layer \u6807\u8bc6<\/p>\n<p>\u6ce8\u8bb0 Layer \u6807\u8bc6<\/p>\n<p>\u9002\u7528\u573a\u666f<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>\u77e2\u91cf\u5730\u56fe\u200b<\/p>\n<\/td>\n<td>\n<p>vec_w<\/p>\n<\/td>\n<td>\n<p>cva_w<\/p>\n<\/td>\n<td>\n<p>\u7535\u5b50\u5bfc\u822a\u3001\u884c\u653f\u8fb9\u754c\u5c55\u793a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5f71\u50cf\u5730\u56fe\u200b<\/p>\n<\/td>\n<td>\n<p>img_w<\/p>\n<\/td>\n<td>\n<p>cia_w<\/p>\n<\/td>\n<td>\n<p>\u536b\u661f\u5f71\u50cf\u5206\u6790\u3001\u5b9e\u666f\u5e95\u56fe<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u5730\u5f62\u6655\u6e32\u200b<\/p>\n<\/td>\n<td>\n<p>ter_w<\/p>\n<\/td>\n<td>\n<p>cta_w<\/p>\n<\/td>\n<td>\n<p>\u5730\u52bf\u5206\u6790\u3001\u4e09\u7ef4\u5730\u5f62\u53ef\u89c6\u5316<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u670d\u52a1\u5730\u5740\u6a21\u677f&#xff1a;<\/p>\n<p>https:\/\/t{0-7}.tianditu.gov.cn\/{layer_type}\/wmts?<br \/>\nSERVICE&#061;WMTS&amp;REQUEST&#061;GetTile&amp;VERSION&#061;1.0.0&amp;<br \/>\nLAYER&#061;{layer}&amp;STYLE&#061;default&amp;TILEMATRIXSET&#061;w&amp;<br \/>\nFORMAT&#061;tiles&amp;TILEMATRIX&#061;{z}&amp;TILEROW&#061;{y}&amp;TILECOL&#061;{x}&amp;tk&#061;{\u60a8\u7684Key} <\/p>\n<ul>\n<li>\n<p>t0-t7&#xff1a;\u5929\u5730\u56fe\u4e8c\u7ea7\u57df\u540d&#xff0c;\u7528\u4e8e\u5e76\u53d1\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<\/li>\n<li>\n<p>TILEMATRIXSET&#061;w&#xff1a;\u5bf9\u5e94 EPSG:3857 \u5207\u7247\u77e9\u9635\u96c6\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e8c\u3001OpenLayers \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\u5b9e\u6218<\/h3>\n<p>OpenLayers \u63a8\u8350\u4f7f\u7528 ol\/source\/XYZ\u200b \u65b9\u5f0f\u52a0\u8f7d\u5929\u5730\u56fe&#xff08;\u6bd4\u539f\u751f WMTS \u914d\u7f6e\u66f4\u7b80\u5355&#xff0c;\u5185\u90e8\u81ea\u52a8\u5904\u7406\u5206\u8fa8\u7387\u77e9\u9635&#xff09;&#xff0c;\u4e5f\u53ef\u4f7f\u7528 TileWMTS\u3002<\/p>\n<h4>2.1 \u73af\u5883\u5f15\u5165<\/h4>\n<p>&lt;link rel&#061;&#034;stylesheet&#034; href&#061;&#034;https:\/\/cdn.jsdelivr.net\/npm\/ol&#064;v7.4.0\/ol.css&#034; \/&gt;<br \/>\n&lt;script src&#061;&#034;https:\/\/cdn.jsdelivr.net\/npm\/ol&#064;v7.4.0\/dist\/ol.js&#034;&gt;&lt;\/script&gt; <\/p>\n<h4>2.2 \u5c01\u88c5\u901a\u7528\u56fe\u5c42\u521b\u5efa\u51fd\u6570&#xff08;XYZ\u65b9\u5f0f&#xff0c;EPSG:3857&#xff09;<\/h4>\n<p>const TDT_KEY &#061; &#039;\u60a8\u7533\u8bf7\u7684\u5929\u5730\u56feKey&#039;; \/\/ \u5fc5\u586b&#xff0c;\u5426\u5219403<\/p>\n<p>\/\/ \u521b\u5efa\u5929\u5730\u56feXYZ\u56fe\u5c42<br \/>\nfunction createTDTLayer(layerType, proj &#061; &#039;EPSG:3857&#039;) {<br \/>\n    const matrixSet &#061; proj &#061;&#061;&#061; &#039;EPSG:3857&#039; ? &#039;w&#039; : &#039;c&#039;;<br \/>\n    return new ol.layer.Tile({<br \/>\n        source: new ol.source.XYZ({<br \/>\n            url: &#096;https:\/\/t{0-7}.tianditu.gov.cn\/${layerType}_${matrixSet}\/wmts?&#096; &#043;<br \/>\n                 &#096;SERVICE&#061;WMTS&amp;REQUEST&#061;GetTile&amp;VERSION&#061;1.0.0&amp;LAYER&#061;${layerType}&amp;&#096; &#043;<br \/>\n                 &#096;STYLE&#061;default&amp;TILEMATRIXSET&#061;${matrixSet}&amp;FORMAT&#061;tiles&amp;&#096; &#043;<br \/>\n                 &#096;TILEMATRIX&#061;{z}&amp;TILEROW&#061;{y}&amp;TILECOL&#061;{x}&amp;tk&#061;${TDT_KEY}&#096;,<br \/>\n            projection: proj,<br \/>\n            wrapX: true<br \/>\n        })<br \/>\n    });<br \/>\n} <\/p>\n<h4>2.3 \u5b8c\u6574\u6848\u4f8b&#xff1a;\u77e2\u91cf&#043;\u6ce8\u8bb0 \/ \u5f71\u50cf&#043;\u6ce8\u8bb0 \/ \u5730\u5f62&#043;\u6ce8\u8bb0 \u5207\u6362<\/h4>\n<p>\/\/ 1. \u77e2\u91cf\u5e95\u56fe &#043; \u77e2\u91cf\u6ce8\u8bb0<br \/>\nconst vecBase &#061; createTDTLayer(&#039;vec&#039;);<br \/>\nconst vecLabel &#061; createTDTLayer(&#039;cva&#039;);<\/p>\n<p>\/\/ 2. \u5f71\u50cf\u5e95\u56fe &#043; \u5f71\u50cf\u6ce8\u8bb0<br \/>\nconst imgBase &#061; createTDTLayer(&#039;img&#039;);<br \/>\nconst imgLabel &#061; createTDTLayer(&#039;cia&#039;);<\/p>\n<p>\/\/ 3. \u5730\u5f62\u6655\u6e32 &#043; \u5730\u5f62\u6ce8\u8bb0<br \/>\nconst terBase &#061; createTDTLayer(&#039;ter&#039;);<br \/>\nconst terLabel &#061; createTDTLayer(&#039;cta&#039;);<\/p>\n<p>\/\/ \u521d\u59cb\u5316\u5730\u56fe&#xff08;\u9ed8\u8ba4\u663e\u793a\u5f71\u50cf\u5e95\u56fe&#xff0c;\u6ce8\u8bb0\u5fc5\u987b\u5728\u5e95\u56fe\u4e4b\u540eaddLayer&#xff09;<br \/>\nconst map &#061; new ol.Map({<br \/>\n    target: &#039;map&#039;,<br \/>\n    layers: [imgBase, imgLabel], \/\/ \u987a\u5e8f&#xff1a;\u5148\u5e95\u56fe&#xff0c;\u540e\u6ce8\u8bb0<br \/>\n    view: new ol.View({<br \/>\n        center: ol.proj.fromLonLat([116.39, 39.9]),<br \/>\n        zoom: 10,<br \/>\n        projection: &#039;EPSG:3857&#039;<br \/>\n    })<br \/>\n});<\/p>\n<p>\/* \u5207\u6362\u793a\u4f8b&#xff1a;\u5207\u6362\u5230\u77e2\u91cf\u5730\u56fe<br \/>\nmap.getLayers().clear();<br \/>\nmap.addLayer(vecBase);<br \/>\nmap.addLayer(vecLabel);<br \/>\n*\/ <\/p>\n<p>\u539f\u7406\u8865\u5145&#xff1a;OpenLayers \u7684 TileGrid \u5bf9\u5929\u5730\u56fe w \u77e9\u9635\u96c6&#xff08;\u539f\u70b9 -20037508.34,20037508.34&#xff09;\u5185\u7f6e\u652f\u6301\u826f\u597d&#xff0c;XYZ \u6e90\u7684 {z}{x}{y} \u4f1a\u81ea\u52a8\u6620\u5c04\u4e3a WMTS \u7684 TileMatrix\/TileCol\/TileRow\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\u5b9e\u6218<\/h3>\n<p>Leaflet \u9ed8\u8ba4\u4f7f\u7528 EPSG:3857&#xff08;L.CRS.EPSG3857&#xff09;&#xff0c;\u52a0\u8f7d _w \u7cfb\u5217\u56fe\u5c42\u6700\u4e3a\u4fbf\u6377&#xff1b;\u82e5\u52a0\u8f7d _c \u5fc5\u987b\u663e\u5f0f\u58f0\u660e crs: L.CRS.EPSG4326\u3002<\/p>\n<h4>3.1 \u73af\u5883\u5f15\u5165<\/h4>\n<p>&lt;link rel&#061;&#034;stylesheet&#034; href&#061;&#034;https:\/\/unpkg.com\/leaflet&#064;1.9.4\/dist\/leaflet.css&#034; \/&gt;<br \/>\n&lt;script src&#061;&#034;https:\/\/unpkg.com\/leaflet&#064;1.9.4\/dist\/leaflet.js&#034;&gt;&lt;\/script&gt; <\/p>\n<h4>3.2 \u5b8c\u6574\u6848\u4f8b&#xff1a;\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62\u53ca\u5176\u6ce8\u8bb0<\/h4>\n<p>const TDT_KEY &#061; &#039;\u60a8\u7533\u8bf7\u7684\u5929\u5730\u56feKey&#039;;<\/p>\n<p>\/\/ \u901a\u7528\u5929\u5730\u56fe\u74e6\u7247\u5c42&#xff08;\u58a8\u5361\u6258_w&#xff09;<br \/>\nfunction tdtLayer(layerType) {<br \/>\n    return L.tileLayer(<br \/>\n        &#096;https:\/\/t{s}.tianditu.gov.cn\/${layerType}_w\/wmts?&#096; &#043;<br \/>\n        &#096;SERVICE&#061;WMTS&amp;REQUEST&#061;GetTile&amp;VERSION&#061;1.0.0&amp;LAYER&#061;${layerType}&amp;&#096; &#043;<br \/>\n        &#096;STYLE&#061;default&amp;TILEMATRIXSET&#061;w&amp;FORMAT&#061;tiles&amp;&#096; &#043;<br \/>\n        &#096;TILEMATRIX&#061;{z}&amp;TILEROW&#061;{y}&amp;TILECOL&#061;{x}&amp;tk&#061;${TDT_KEY}&#096;,<br \/>\n        {<br \/>\n            subdomains: [&#039;0&#039;,&#039;1&#039;,&#039;2&#039;,&#039;3&#039;,&#039;4&#039;,&#039;5&#039;,&#039;6&#039;,&#039;7&#039;], \/\/ \u8d1f\u8f7d\u5747\u8861<br \/>\n            tileSize: 256,<br \/>\n            zoomOffset: 0,<br \/>\n            maxZoom: 18<br \/>\n        }<br \/>\n    );<br \/>\n}<\/p>\n<p>\/\/ \u521b\u5efa\u56fe\u5c42\u7ec4&#xff08;\u5e95\u56fe&#043;\u6ce8\u8bb0\u7ed1\u5b9a\u5728\u4e00\u8d77&#xff09;<br \/>\nconst vecGroup &#061; L.layerGroup([tdtLayer(&#039;vec&#039;), tdtLayer(&#039;cva&#039;)]);<br \/>\nconst imgGroup &#061; L.layerGroup([tdtLayer(&#039;img&#039;), tdtLayer(&#039;cia&#039;)]);<br \/>\nconst terGroup &#061; L.layerGroup([tdtLayer(&#039;ter&#039;), tdtLayer(&#039;cta&#039;)]);<\/p>\n<p>\/\/ \u521d\u59cb\u5316\u5730\u56fe<br \/>\nconst map &#061; L.map(&#039;map&#039;, {<br \/>\n    center: [39.9, 116.39],<br \/>\n    zoom: 10,<br \/>\n    crs: L.CRS.EPSG3857 \/\/ \u9ed8\u8ba4\u5373\u6b64&#xff0c;\u663e\u5f0f\u5199\u51fa\u4fbf\u4e8e\u7ef4\u62a4<br \/>\n});<\/p>\n<p>\/\/ \u9ed8\u8ba4\u6dfb\u52a0\u5f71\u50cf\u5e95\u56fe\u7ec4<br \/>\nimgGroup.addTo(map); <\/p>\n<p>\u6ce8\u610f&#xff1a;Leaflet \u7684 {z}{x}{y} \u5bf9\u5e94 WMTS \u7684 TileMatrix\/TileCol\/TileRow&#xff0c;\u4e14 tileSize \u5fc5\u987b\u4e3a 256&#xff0c;\u5929\u5730\u56fe\u4e0d\u652f\u6301 512 \u74e6\u7247\u3002<\/p>\n<hr \/>\n<h3>\u56db\u3001\u907f\u5751\u603b\u7ed3&#xff08;\u9ad8\u9891\u62a5\u9519\u6392\u67e5&#xff09;<\/h3>\n<ul>\n<li>\n<p>403 Forbidden&#xff1a;\u672a\u643a\u5e26 tk&#061;Key \u6216 Key \u672a\u751f\u6548&#xff08;\u7533\u8bf7\u540e\u6709 5~10 \u5206\u949f\u5ef6\u8fdf&#xff0c;\u4e14\u9700\u52fe\u9009\u201c\u5730\u56feAPI\u201d\u6743\u9650&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u74e6\u7247\u9519\u4f4d\/\u6f02\u79fb&#xff1a;<\/p>\n<ul>\n<li>\n<p>OpenLayers View \u8bbe\u4e86 EPSG:3857 \u5374\u7528\u4e86 vec_c \u7684 URL&#xff08;\u5e94\u6539\u4e3a vec_w&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Leaflet \u672a\u58f0\u660e crs \u5374\u52a0\u8f7d\u4e86 _c \u56fe\u5c42&#xff08;\u9ed8\u8ba4 3857 \u4f1a\u7b97\u9519\u884c\u5217\u53f7&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6ce8\u8bb0\u6d88\u5931&#xff1a;\u6ce8\u8bb0\u5c42\u88ab\u5e95\u56fe\u5c42\u8986\u76d6&#xff0c;\u786e\u4fdd\u4ee3\u7801\u4e2d\u5148 add \u5e95\u56fe&#xff0c;\u518d add \u6ce8\u8bb0&#xff0c;\u6216\u4f7f\u7528 layerGroup \u7ba1\u7406\u987a\u5e8f\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fb9\u7f18\u7a7a\u767d&#xff08;wrapX&#xff09;&#xff1a;\u5168\u7403\u5730\u56fe\u5efa\u8bae\u5728 OpenLayers XYZ \u6e90\u4e2d\u5f00\u542f wrapX: true&#xff0c;Leaflet \u9ed8\u8ba4\u652f\u6301\u6a2a\u5411\u5faa\u73af\u3002<\/p>\n<\/li>\n<li>\n<p>\u6df7\u5408\u5750\u6807\u504f\u79fb&#xff1a;\u5929\u5730\u56fe\u662f CGCS2000&#xff08;\u8fd1\u4f3c WGS84&#xff09;&#xff0c;\u82e5\u53e0\u52a0\u9ad8\u5fb7\/\u817e\u8baf&#xff08;GCJ-02 \u706b\u661f\u5750\u6807&#xff09;\u6570\u636e\u4f1a\u4ea7\u751f\u51e0\u767e\u7c73\u504f\u79fb&#xff0c;\u9700\u5728\u524d\u7aef\u505a\u7ea0\u504f\u8f6c\u6362\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>\u4e94\u3001\u5c0f\u7ed3<\/h3>\n<ul>\n<li>\n<p>\u5929\u5730\u56fe\u672c\u8d28\u662f WMTS \u6807\u51c6\u74e6\u7247&#xff0c;_w(3857) \u4e0e _c(4326) \u6295\u5f71\u4e0d\u53ef\u6df7\u7528\u662f\u7b2c\u4e00\u4f4d\u7684\u539f\u5219\u3002<\/p>\n<\/li>\n<li>\n<p>\u5e95\u56fe &#043; \u6ce8\u8bb0\u200b \u5fc5\u987b\u6210\u5bf9\u52a0\u8f7d\u4e14\u6ce8\u8bb0\u5728\u4e0a&#xff0c;\u624d\u80fd\u770b\u5230\u5b8c\u6574\u7684\u201c\u6709\u5b57\u7684\u5730\u56fe\u201d\u3002<\/p>\n<\/li>\n<li>\n<p>OpenLayers \u7528 source.XYZ \u662f\u6700\u7b80\u6d01\u7a33\u5b9a\u7684\u65b9\u6848&#xff1b;Leaflet \u7528 L.tileLayer \u62fc WMTS \u6a21\u677f\u5373\u53ef\u8986\u76d6\u77e2\u91cf\u3001\u5f71\u50cf\u3001\u5730\u5f62\u5168\u7cfb\u56fe\u5c42\u3002<\/p>\n<\/li>\n<li>\n<p>\u751f\u4ea7\u73af\u5883\u52a1\u5fc5\u5904\u7406\u597d Key \u7684\u767d\u540d\u5355\u200b \u4e0e t0-t7 \u5b50\u57df\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<\/li>\n<\/ul>\n<p>&#x1f4cc; \u53c2\u8003\u6587\u732e&#xff1a;\u5929\u5730\u56fe\u5b98\u65b9 WMTS \u8bf4\u660e\u3001OpenLayers \u5b98\u65b9\u6587\u6863\u3001SuperMap iClient \u6280\u672f\u624b\u518c\u53ca\u4e3b\u6d41 GIS \u793e\u533a\u5b9e\u6218\u603b\u7ed3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981&#xff1a;\u5929\u5730\u56fe\u4f5c\u4e3a\u56fd\u5bb6\u5730\u7406\u4fe1\u606f\u516c\u5171\u670d\u52a1\u5e73\u53f0&#xff0c;\u63d0\u4f9b\u6807\u51c6\u7684 WMTS\u200b \u74e6\u7247\u670d\u52a1\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790\u5929\u5730\u56fe\u7684\u53cc\u6295\u5f71\u4f53\u7cfb\u4e0e\u56fe\u5c42\u5206\u5c42\u8bbe\u8ba1\u539f\u7406&#xff0c;\u5e76\u5206\u522b\u7ed9\u51fa OpenLayers&#xff08;XYZ\/WMTS\u65b9\u5f0f&#xff09;\u200b \u4e0e Leaflet\u200b \u52a0\u8f7d\u77e2\u91cf\u5e95\u56fe\u3001\u77e2\u91cf\u6ce8\u8bb0\u3001\u5f71\u50cf\u5e95\u56fe\u3001\u5f71\u50cf\u6ce8\u8bb0\u3001\u5730\u5f62\u6655\u6e32\u53ca\u5730\u5f62\u6ce8\u8bb0\u7684\u5b8c\u6574\u53ef\u8fd0\u884c\u4ee3\u7801&#xff0c;\u9644\u5e26\u5750\u6807\u7cfb\u5339\u914d\u3001Key\u914d\u7f6e\u3001\u6ce8\u8bb0\u53e0\u52a0\u987a\u5e8f\u7b49\u6838\u5fc3\u907f\u5751\u6307\u5357\u3002 \u4e00\u3001\u5929\u5730\u56fe\u670d\u52a1\u539f\u7406\u4e0e\u56fe\u5c42\u4f53\u7cfb\u89e3\u6790<br \/>\n1.1 WM<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9893,684,187,4014,885],"topic":[],"class_list":["post-87432","post","type-post","status-publish","format-standard","hentry","category-server","tag-leaflet","tag-vue3","tag-javascript","tag-openlayers","tag-885"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87432.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6458\u8981&#xff1a;\u5929\u5730\u56fe\u4f5c\u4e3a\u56fd\u5bb6\u5730\u7406\u4fe1\u606f\u516c\u5171\u670d\u52a1\u5e73\u53f0&#xff0c;\u63d0\u4f9b\u6807\u51c6\u7684 WMTS\u200b \u74e6\u7247\u670d\u52a1\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790\u5929\u5730\u56fe\u7684\u53cc\u6295\u5f71\u4f53\u7cfb\u4e0e\u56fe\u5c42\u5206\u5c42\u8bbe\u8ba1\u539f\u7406&#xff0c;\u5e76\u5206\u522b\u7ed9\u51fa OpenLayers&#xff08;XYZ\/WMTS\u65b9\u5f0f&#xff09;\u200b \u4e0e Leaflet\u200b \u52a0\u8f7d\u77e2\u91cf\u5e95\u56fe\u3001\u77e2\u91cf\u6ce8\u8bb0\u3001\u5f71\u50cf\u5e95\u56fe\u3001\u5f71\u50cf\u6ce8\u8bb0\u3001\u5730\u5f62\u6655\u6e32\u53ca\u5730\u5f62\u6ce8\u8bb0\u7684\u5b8c\u6574\u53ef\u8fd0\u884c\u4ee3\u7801&#xff0c;\u9644\u5e26\u5750\u6807\u7cfb\u5339\u914d\u3001Key\u914d\u7f6e\u3001\u6ce8\u8bb0\u53e0\u52a0\u987a\u5e8f\u7b49\u6838\u5fc3\u907f\u5751\u6307\u5357\u3002 \u4e00\u3001\u5929\u5730\u56fe\u670d\u52a1\u539f\u7406\u4e0e\u56fe\u5c42\u4f53\u7cfb\u89e3\u6790 1.1 WM\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87432.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-30T01:48:25+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87432.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87432.html\",\"name\":\"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-30T01:48:25+00:00\",\"dateModified\":\"2026-07-30T01:48:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87432.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87432.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87432.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87432.html","og_locale":"zh_CN","og_type":"article","og_title":"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6458\u8981&#xff1a;\u5929\u5730\u56fe\u4f5c\u4e3a\u56fd\u5bb6\u5730\u7406\u4fe1\u606f\u516c\u5171\u670d\u52a1\u5e73\u53f0&#xff0c;\u63d0\u4f9b\u6807\u51c6\u7684 WMTS\u200b \u74e6\u7247\u670d\u52a1\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790\u5929\u5730\u56fe\u7684\u53cc\u6295\u5f71\u4f53\u7cfb\u4e0e\u56fe\u5c42\u5206\u5c42\u8bbe\u8ba1\u539f\u7406&#xff0c;\u5e76\u5206\u522b\u7ed9\u51fa OpenLayers&#xff08;XYZ\/WMTS\u65b9\u5f0f&#xff09;\u200b \u4e0e Leaflet\u200b \u52a0\u8f7d\u77e2\u91cf\u5e95\u56fe\u3001\u77e2\u91cf\u6ce8\u8bb0\u3001\u5f71\u50cf\u5e95\u56fe\u3001\u5f71\u50cf\u6ce8\u8bb0\u3001\u5730\u5f62\u6655\u6e32\u53ca\u5730\u5f62\u6ce8\u8bb0\u7684\u5b8c\u6574\u53ef\u8fd0\u884c\u4ee3\u7801&#xff0c;\u9644\u5e26\u5750\u6807\u7cfb\u5339\u914d\u3001Key\u914d\u7f6e\u3001\u6ce8\u8bb0\u53e0\u52a0\u987a\u5e8f\u7b49\u6838\u5fc3\u907f\u5751\u6307\u5357\u3002 \u4e00\u3001\u5929\u5730\u56fe\u670d\u52a1\u539f\u7406\u4e0e\u56fe\u5c42\u4f53\u7cfb\u89e3\u6790 1.1 WM","og_url":"https:\/\/www.wsisp.com\/helps\/87432.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-30T01:48:25+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87432.html","url":"https:\/\/www.wsisp.com\/helps\/87432.html","name":"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-30T01:48:25+00:00","dateModified":"2026-07-30T01:48:25+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87432.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87432.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87432.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"OpenLayers \u4e0e Leaflet \u52a0\u8f7d\u5929\u5730\u56fe\u5168\u7cfb\u56fe\u5c42\uff08\u77e2\u91cf\/\u5f71\u50cf\/\u5730\u5f62+\u5e95\u56fe\/\u6ce8\u8bb0\uff09\u2014\u2014\u539f\u7406\u4e0e\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87432"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87432\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87432"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}