{"id":2010,"date":"2023-12-12T21:18:05","date_gmt":"2023-12-12T13:18:05","guid":{"rendered":"https:\/\/usei.cn\/?p=2010"},"modified":"2023-12-12T23:40:58","modified_gmt":"2023-12-12T15:40:58","slug":"webgis-%e5%bc%80%e5%8f%91%e8%b5%84%e6%ba%90","status":"publish","type":"post","link":"https:\/\/usei.cn\/index.php\/2023\/12\/12\/webgis-%e5%bc%80%e5%8f%91%e8%b5%84%e6%ba%90\/","title":{"rendered":"WebGis \u5f00\u53d1\u8d44\u6e90"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u5ba2\u6237\u7aef\u6846\u67b6<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u670d\u52a1\u7aef<\/h3>\n\n\n\n<p>GeoServer<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5728\u7ebf\u5730\u56fe\u8d44\u6e90<\/h3>\n\n\n\n<p>1.\u5929\u5730\u56fe<\/p>\n\n\n\n<p>http:\/\/lbs.tianditu.gov.cn\/server\/MapService.html<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if(type == 0){\r\n\t\t\/\/\u77e2\u91cf\u5730\u56fe\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(\r\n\t\t\tnew Cesium.WebMapTileServiceImageryProvider({\r\n\t\t\t\turl: \"http:\/\/{s}.tianditu.gov.cn\/vec_c\/wmts?service=wmts&amp;request=GetTile&amp;version=1.0.0\" +\r\n\t\t\t\t\t\"&amp;LAYER=vec&amp;tileMatrixSet=c&amp;TileMatrix={TileMatrix}&amp;TileRow={TileRow}&amp;TileCol={TileCol}\" +\r\n\t\t\t\t\t\"&amp;style=default&amp;format=tiles&amp;tk=\u5929\u5730\u56fe\u7684TOKEN\",\r\n\t\t\t\tlayer: \"tdtCva\",\r\n\t\t\t\tstyle: \"default\",\r\n\t\t\t\tformat: \"tiles\",\r\n\t\t\t\ttileMatrixSetID: \"c\",\r\n\t\t\t\tsubdomains: &#91;\"t0\", \"t1\", \"t2\", \"t3\", \"t4\", \"t5\", \"t6\", \"t7\"],\r\n\t\t\t\ttilingScheme: new Cesium.GeographicTilingScheme(),\r\n\t\t\t\ttileMatrixLabels: &#91;\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\"],\r\n\t\t\t\tmaximumLevel: 18\r\n\t\t\t})\r\n\t\t);\r\n\t}else if(type == 1){\r\n\t\t\/\/\u5f71\u50cf\u5730\u56fe\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(\r\n\t\t\tnew Cesium.WebMapTileServiceImageryProvider({\r\n\t\t\t\turl: \"http:\/\/{s}.tianditu.gov.cn\/img_c\/wmts?service=wmts&amp;request=GetTile&amp;version=1.0.0\" +\r\n\t\t\t\t\t\"&amp;LAYER=img&amp;tileMatrixSet=c&amp;TileMatrix={TileMatrix}&amp;TileRow={TileRow}&amp;TileCol={TileCol}\" +\r\n\t\t\t\t\t\"&amp;style=default&amp;format=tiles&amp;tk=\u5929\u5730\u56fe\u7684TOKEN\",\r\n\t\t\t\tlayer: \"tdtCva\",\r\n\t\t\t\tstyle: \"default\",\r\n\t\t\t\tformat: \"tiles\",\r\n\t\t\t\ttileMatrixSetID: \"c\",\r\n\t\t\t\tsubdomains: &#91;\"t0\", \"t1\", \"t2\", \"t3\", \"t4\", \"t5\", \"t6\", \"t7\"],\r\n\t\t\t\ttilingScheme: new Cesium.GeographicTilingScheme(),\r\n\t\t\t\ttileMatrixLabels: &#91;\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\"],\r\n\t\t\t\tmaximumLevel: 18\r\n\t\t\t})\r\n\t\t);\r\n\t}else if(type == 2){\r\n\t\t\/\/\u6805\u683c\u5730\u56fe\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(\r\n\t\t\tnew Cesium.WebMapTileServiceImageryProvider({\r\n\t\t\t\turl: \"http:\/\/{s}.tianditu.gov.cn\/ter_c\/wmts?service=wmts&amp;request=GetTile&amp;version=1.0.0\" +\r\n\t\t\t\t\t\"&amp;LAYER=ter&amp;tileMatrixSet=c&amp;TileMatrix={TileMatrix}&amp;TileRow={TileRow}&amp;TileCol={TileCol}\" +\r\n\t\t\t\t\t\"&amp;style=default&amp;format=tiles&amp;tk=\u5929\u5730\u56fe\u7684TOKEN\",\r\n\t\t\t\tlayer: \"tdtCva\",\r\n\t\t\t\tstyle: \"default\",\r\n\t\t\t\tformat: \"tiles\",\r\n\t\t\t\ttileMatrixSetID: \"c\",\r\n\t\t\t\tsubdomains: &#91;\"t0\", \"t1\", \"t2\", \"t3\", \"t4\", \"t5\", \"t6\", \"t7\"],\r\n\t\t\t\ttilingScheme: new Cesium.GeographicTilingScheme(),\r\n\t\t\t\ttileMatrixLabels: &#91;\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\"],\r\n\t\t\t\tmaximumLevel: 18\r\n\t\t\t})\r\n\t\t);\r\n\t}else if(type == 3){\r\n\t\t\/\/\u6807\u8bb0\u5730\u56fe\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(\r\n\t\t\tnew Cesium.WebMapTileServiceImageryProvider({\r\n\t\t\t\turl: \"http:\/\/{s}.tianditu.gov.cn\/cia_c\/wmts?service=wmts&amp;request=GetTile&amp;version=1.0.0\" +\r\n\t\t\t\t\t\"&amp;LAYER=cia&amp;tileMatrixSet=c&amp;TileMatrix={TileMatrix}&amp;TileRow={TileRow}&amp;TileCol={TileCol}\" +\r\n\t\t\t\t\t\"&amp;style=default&amp;format=tiles&amp;tk=\u5929\u5730\u56fe\u7684TOKEN\",\r\n\t\t\t\tlayer: \"tdtCva\",\r\n\t\t\t\tstyle: \"default\",\r\n\t\t\t\tformat: \"tiles\",\r\n\t\t\t\ttileMatrixSetID: \"c\",\r\n\t\t\t\tsubdomains: &#91;\"t0\", \"t1\", \"t2\", \"t3\", \"t4\", \"t5\", \"t6\", \"t7\"],\r\n\t\t\t\ttilingScheme: new Cesium.GeographicTilingScheme(),\r\n\t\t\t\ttileMatrixLabels: &#91;\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\"],\r\n\t\t\t\tmaximumLevel: 18\r\n\t\t\t})\r\n\t\t);\r\n\t}<\/code><\/pre>\n\n\n\n<p>2.\u9ad8\u5fb7<\/p>\n\n\n\n<p>\u9ad8\u5fb7\u5730\u56fe\u9700\u8981\u8fdb\u884c\u8f6c\u6362\uff0c\u9ad8\u5fb7\u5730\u56fe\u4f7f\u7528\u7684\u662fGCJ-02\u5750\u6807\u7cfb\uff0c\u800cCesium\u4f7f\u7528\u7684\u662fWGS84\u5750\u6807\u7cfb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if(type == 0){\r\n\t\t\/\/\u9ad8\u5fb7\u77e2\u91cf\u56fe\r\n\t\tlet tdtLayer = new Cesium.UrlTemplateImageryProvider({\r\n\t\t\turl: \"http:\/\/webrd02.is.autonavi.com\/appmaptile?lang=zh_cn&amp;size=1&amp;scale=1&amp;style=8&amp;x={x}&amp;y={y}&amp;z={z}\",\r\n\t\t\tminimumLevel: 3,\r\n\t\t\tmaximumLevel: 18\r\n\t\t})\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(tdtLayer);\r\n\t}else if(type == 1){\r\n\t\t\/\/\u9ad8\u5fb7\u5f71\u50cf\r\n\t\tlet tdtLayer = new Cesium.UrlTemplateImageryProvider({\r\n\t\t    url: \"https:\/\/webst02.is.autonavi.com\/appmaptile?style=6&amp;x={x}&amp;y={y}&amp;z={z}\",\r\n\t\t    minimumLevel: 3,\r\n\t\t    maximumLevel: 18\r\n\t\t})\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(tdtLayer);\r\n\t}else if(type == 2){\r\n\t\t\/\/\u9ad8\u5fb7\u8def\u7f51\u4e2d\u6587\u6ce8\u8bb0\r\n\t\tlet tdtLayer = new Cesium.UrlTemplateImageryProvider({\r\n\t\t\turl: \"http:\/\/webst02.is.autonavi.com\/appmaptile?x={x}&amp;y={y}&amp;z={z}&amp;lang=zh_cn&amp;size=1&amp;scale=1&amp;style=8\",\r\n\t\t\tminimumLevel: 3,\r\n\t\t\tmaximumLevel: 18\r\n\t\t})\r\n\t\tthis.viewer.imageryLayers.addImageryProvider(tdtLayer);\r\n\t}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5730\u56fe\u6570\u636e<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>GeoJSON \u963f\u91cc\u4e91\u53ef\u89c6\u5316<\/td><td>https:\/\/datav.aliyun.com\/portal\/school\/atlas\/area_selector<\/td><\/tr><tr><td>\u5168\u56fd\u5730\u7406\u4fe1\u606f\u8d44\u6e90\u76ee\u5f55\u670d\u52a1\u7cfb\u7edf<\/td><td>https:\/\/www.webmap.cn\/main.do?method=index<\/td><\/tr><tr><td>\u5730\u7406\u56fd\u60c5\u76d1\u6d4b\u4e91\u5e73\u53f0<\/td><td>http:\/\/www.dsac.cn\/<\/td><\/tr><tr><td>\u56fd\u5bb6\u5730\u7403\u7cfb\u7edf\u79d1\u5b66\u6570\u636e\u5171\u4eab\u670d\u52a1\u5e73\u53f0<\/td><td>https:\/\/www.geodata.cn\/thematicView\/<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4eba\u6587\u6570\u636e<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td><\/td><\/tr><tr><td>\u4e16\u754c\u94f6\u884c\u516c\u5f00\u6570\u636e\uff1a<\/td><td>https:\/\/data.worldbank.org.cn\/country\/china?view=chart<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u9065\u611f\u6570\u636e<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td><\/td><\/tr><tr><td>\u5730\u7406\u7a7a\u95f4\u6570\u636e\u4e91\uff1a<\/td><td>https:\/\/www.gscloud.cn<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u5ba2\u6237\u7aef\u6846\u67b6 \u670d\u52a1\u7aef GeoServer \u5728\u7ebf\u5730\u56fe\u8d44\u6e90 1.\u5929\u5730\u56fe http:\/\/lbs.tianditu.go [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-2010","post","type-post","status-publish","format-standard","hentry","category-cesium"],"_links":{"self":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/2010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2010"}],"version-history":[{"count":15,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/2010\/revisions"}],"predecessor-version":[{"id":2036,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/2010\/revisions\/2036"}],"wp:attachment":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}