{"id":424,"date":"2025-04-02T17:20:56","date_gmt":"2025-04-02T09:20:56","guid":{"rendered":"https:\/\/cthzs.cn\/?p=424"},"modified":"2025-04-06T15:12:36","modified_gmt":"2025-04-06T07:12:36","slug":"%e5%a1%9e%e5%b0%94%e8%be%be%e4%bc%a0%e8%af%b4-%e6%97%b7%e9%87%8e%e7%8e%8b%e6%b3%aa-%e7%93%a6%e7%89%87%e5%9c%b0%e5%9b%be","status":"publish","type":"post","link":"https:\/\/loveyou.cthzs.cn\/?p=424","title":{"rendered":"\u585e\u5c14\u8fbe\u4f20\u8bf4-\u65f7\u91ce\u738b\u6cea-\u74e6\u7247\u5730\u56fe"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u74e6\u7247\u5730\u56fe\u91d1\u5b57\u5854\u6a21\u578b\u662f\u4e00\u79cd\u591a\u5206\u8fa8\u7387\u5c42\u6b21\u6a21\u578b\uff0c\u4ece\u74e6\u7247\u91d1\u5b57\u5854\u7684\u5e95\u5c42\u5230\u9876\u5c42\uff0c\u5206\u8fa8\u7387\u8d8a\u6765\u8d8a\u4f4e\uff0c\u4f46\u8868\u793a\u7684\u5730\u7406\u8303\u56f4\u4e0d\u53d8\u3002<\/strong>&nbsp;\u9996\u5148\u786e\u5b9a\u5730\u56fe\u670d\u52a1\u5e73\u53f0\u6240\u8981\u63d0\u4f9b\u7684\u7f29\u653e\u7ea7\u522b\u7684\u6570\u91cf&nbsp;N\uff0c\u628a\u7f29\u653e\u7ea7\u522b\u6700\u9ad8\u3001\u5730\u56fe\u6bd4\u4f8b\u5c3a\u6700\u5927\u7684\u5730\u56fe\u56fe\u7247\u4f5c\u4e3a\u91d1\u5b57\u5854\u7684\u5e95\u5c42\uff0c\u5373\u7b2c&nbsp;0&nbsp;\u5c42\uff0c\u5e76\u5bf9\u5176\u8fdb\u884c\u5206\u5757\uff0c\u4ece\u5730\u56fe\u56fe\u7247\u7684\u5de6\u4e0a\u89d2\u5f00\u59cb\uff0c\u4ece\u5de6\u81f3\u53f3\u3001\u4ece\u4e0a\u5230\u4e0b\u8fdb\u884c\u5207\u5272\uff0c\u5206\u5272\u6210\u76f8\u540c\u5927\u5c0f\u7684\u6b63\u65b9\u5f62\u5730\u56fe\u74e6\u7247\uff0c\u5f62\u6210\u7b2c&nbsp;0&nbsp;\u5c42\u74e6\u7247\u77e9\u9635\uff1b\u5728\u7b2c&nbsp;0&nbsp;\u5c42\u5730\u56fe\u56fe\u7247\u7684\u57fa\u7840\u4e0a\uff0c\u6309\u6bcf\u50cf\u7d20\u5206\u5272\u4e3a&nbsp;2\u00d72&nbsp;\u4e2a\u50cf\u7d20\u7684\u65b9\u6cd5\u751f\u6210\u7b2c&nbsp;1&nbsp;\u5c42\u5730\u56fe\u56fe\u7247\uff0c\u5e76\u5bf9\u5176\u8fdb\u884c\u5206\u5757\uff0c\u5206\u5272\u6210\u4e0e\u4e0b\u4e00\u5c42\u76f8\u540c\u5927\u5c0f\u7684\u6b63\u65b9\u5f62\u5730\u56fe\u74e6\u7247\uff0c\u5f62\u6210\u7b2c1\u5c42\u74e6\u7247\u77e9\u9635\uff1b\u91c7\u7528\u540c\u6837\u7684\u65b9\u6cd5\u751f\u6210\u7b2c&nbsp;2&nbsp;\u5c42\u74e6\u7247\u77e9\u9635\uff1b...... \u5982\u6b64\u4e0b\u53bb\uff0c\u76f4\u5230\u7b2c&nbsp;N-1<code>&nbsp;<\/code>\u5c42\uff0c\u6784\u6210\u6574\u4e2a\u74e6\u7247\u91d1\u5b57\u5854\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"255\" src=\"https:\/\/cthzs.cn\/wp-content\/uploads\/2025\/04\/1743588126-tile_1.png\" alt=\"\" class=\"wp-image-434\" srcset=\"https:\/\/loveyou.cthzs.cn\/wp-content\/uploads\/2025\/04\/1743588126-tile_1.png 764w, https:\/\/loveyou.cthzs.cn\/wp-content\/uploads\/2025\/04\/1743588126-tile_1-300x100.png 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u585e\u5c14\u8fbe\u4f20\u8bf4 \u65f7\u91ce-\u738b\u6cea\u5730\u56fe<\/h2>\n\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"\/map\/leaflet\/leaflet.css\">\n    <script src=\"\/map\/leaflet\/leaflet.js\"><\/script>\n    <style>\n        .mapdiv {\n            height: 400px;\n            width: 100%;\n            background-color: black;\n        }\n    <\/style>\n<\/head>\n<body>\n    <div id=\"mapdiv\" class=\"mapdiv\"><\/div>\n    <script>\n        \/\/ \u6dfb\u52a0\u672c\u5730\u74e6\u7247\u56fe\u5c42\n        \/\/ \u5730\u56fe\u8fb9\u754c\u7eac\u5ea6\n        var bounds = new L.LatLngBounds(\n            new L.LatLng(-20.250000, -3.750000),\n            new L.LatLng(-243.250000, 262.500000)\n        );\n\n        var bounds12 = new L.LatLngBounds(\n            new L.LatLng(-47.406250, 5.531250),\n            new L.LatLng(-284.484375, 289.140625)\n        );\n\n        var map = L.map('mapdiv', {\n            crs: L.CRS.Simple,\n            attributionControl: false,\n            \/\/ \u79fb\u9664 maxBounds \u5c5e\u6027\u4ee5\u53d6\u6d88\u5750\u6807\u9650\u5236\n            maxBoundsViscosity: 1.0,\n            minZoom: 2,\n            maxZoom: 6\n        }).setView([-128, 127.5], 2);\n\n        var kuangye = L.tileLayer('\/map\/The Legend of Zelda-Breath of the Wild\/{z}_{x}_{y}.png', {\n            bounds: bounds,\n            tileSize: 256,\n            noWrap: true,\n            tms: true\n        }).addTo(map);\n\n        var wanglei = L.tileLayer('\/map\/The Legend of Zelda-Tears of the Kingdom\/ground\/z{z}\/{x}_{y}.png', {\n            bounds: bounds12,\n            tileSize: 256,\n            noWrap: true,\n            tms: true\n        });\n\n        \/\/ \u786e\u4fdd\u5728\u6dfb\u52a0 wanglei \u56fe\u5c42\u65f6\u91cd\u65b0\u8bbe\u7f6e\u5730\u56fe\u89c6\u56fe\n        wanglei.on('add', function () {\n            map.fitBounds(bounds12);\n        });\n\n        var baseLayers = {\n            \"\u65f7\u91ce\": kuangye,\n            \"\u738b\u6cea\": wanglei\n        };\n\n        L.control.layers(baseLayers).addTo(map);\n    <\/script>\n<\/body>\n<\/html>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u65f6\u8fd8\u53ef\u4ee5\u4f7f\u7528 leaflet \u7684\u5730\u56fe\u6807\u6ce8\u529f\u80fd\uff0c\u5728\u5730\u56fe\u4e0a\u8fdb\u884c\u6807\u8bb0\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>L.marker([x, y])<\/code>\uff1a\u9664\u4e86\u74e6\u7247\u4e4b\u5916\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u5730\u56fe\u4e2d\u6dfb\u52a0\u5176\u4ed6\u4e1c\u897f\uff0c\u5305\u62ec\u6807\u8bb0\u3001\u6298\u7ebf\u3001\u591a\u8fb9\u5f62\u3001\u5706\u5708\u548c\u5f39\u51fa\u7a97\u53e3\u3002<\/li>\n\n\n\n<li><code>L.divIcon<\/code>: \u81ea\u5b9a\u4e49\u56fe\u6807\u3002<\/li>\n\n\n\n<li><code>bindPopup<\/code>: \u5f39\u51fa\u7a97\u53e3\u901a\u5e38\u7528\u4e8e\u5c06\u67d0\u4e9b\u4fe1\u606f\u9644\u52a0\u5230\u5730\u56fe\u4e0a\u7684\u7279\u5b9a\u5bf9\u8c61\u4e0a\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5217\u5165\u6211\u9700\u8981\u5728\u738b\u6cea\u5730\u56fe\u4e0a\u663e\u793a\u4e00\u4e2a\u5179\u62c9\u5361\u74e6\u5361\u795e\u5e99\u9644\u8fd1\u7684\u4eba\u9a6c\u4f4d\u7f6e\u7684\u8bdd\u53ef\u4ee5\u8fd9\u4e48\u5199<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        var greenIcon = L.icon({\n    iconUrl: 'icons8-\u585e\u5c14\u8fbe\u5929\u7a7a\u4e4b\u5251\u4f20\u8bf4-100.png', \/\/\u56fe\u6807\u4f4d\u7f6e\n\n    iconSize:     &#91;38, 38], \/\/ \u56fe\u6807\u5927\u5c0f\n    iconAnchor:   &#91;0, 0], \/\/ \u56fe\u6807\u7684\u70b9\uff0c\u5b83\u5c06\u5bf9\u5e94\u4e8e\u6807\u8bb0\u7684\u4f4d\u7f6e\n    popupAnchor:  &#91;16,0]\/\/ \u5f39\u51fa\u7a97\u53e3\u76f8\u5bf9\u4e8e\u56fe\u6807\u951a\u70b9\u6253\u5f00\u7684\u4f4d\u7f6ethe iconAnchor\n});\n\n  var marker = L.marker(&#91;-165.281250,67.562500], {icon: greenIcon})\n\n          .bindPopup(\"\u7ea2\u8272\u4eba\u9a6c\")\n          .addTo(map);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u76d1\u63a7\u9f20\u6807\u70b9\u51fb\u7ecf\u7eac\u5ea6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          var popup = L.popup();\n        function onMapClick(e) {\n            var lat = e.latlng.lat.toFixed(6);\n            var lng = e.latlng.lng.toFixed(6);\n            popup\n               .setLatLng(e.latlng)\n               .setContent(`\u7eac\u5ea6: ${lat}, \u7ecf\u5ea6: ${lng}`)\n               .openOn(map);\n        }\n        map.on('click', onMapClick);<\/code><\/pre>\n\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"\/map\/leaflet\/leaflet.css\">\n    <script src=\"\/map\/leaflet\/leaflet.js\"><\/script>\n    <style>\n        .mapdiv {\n            height: 400px;\n            width: 100%;\n            background-color: black;\n        }\n        <\/style>\n<\/head>\n<body>\n    <div id=\"mapdiv\" class=\"mapdiv\"><\/div>\n    <script>\n\/\/ \u6dfb\u52a0\u672c\u5730\u74e6\u7247\u56fe\u5c42\n\/\/ \u5730\u56fe\u8fb9\u754c\u7eac\u5ea6\nvar bounds = new L.LatLngBounds(\n    new L.LatLng(-47.406250,5.531250),\n    new L.LatLng(-284.484375,289.140625)\n  );\n\n  var map = L.map('mapdiv', {\n    crs: L.CRS.Simple,\n    attributionControl: false,\n    maxBounds: bounds,\n    maxBoundsViscosity: 1.0,\n    minZoom: 1,\n    maxZoom: 6\n  }).setView([-155.062500,140.656250], 1);\n\n  L.tileLayer('\/map\/The Legend of Zelda-Tears of the Kingdom\/z{z}\/{x}_{y}.png', {\n    bounds: bounds,\n    tileSize: 256,\n    noWrap: true,\n    tms: true\n  }).addTo(map);\n\n          \/\/\u663e\u793a\u9f20\u6807\u70b9\u51fb\u7ecf\u7eac\u5ea6\n          var popup = L.popup();\n        function onMapClick(e) {\n            var lat = e.latlng.lat.toFixed(6);\n            var lng = e.latlng.lng.toFixed(6);\n            popup\n               .setLatLng(e.latlng)\n               .setContent(`\u7eac\u5ea6: ${lat}, \u7ecf\u5ea6: ${lng}`)\n               .openOn(map);\n        }\n        map.on('click', onMapClick);\n\n        var greenIcon = L.icon({\n    iconUrl: '\/map\/ico\/origin_3845393_77486.png',\n\n    iconSize:     [15, 15], \/\/ size of the icon\n    iconAnchor:   [0, 0], \/\/ point of the icon which will correspond to marker's location\n    popupAnchor:  [8,0]\/\/ point from which the popup should open relative to the iconAnchor\n});\n\n  var marker = L.marker([-165.281250,67.562500], {icon: greenIcon})\n\n          .bindPopup(\"\u7ea2\u8272\u4eba\u9a6c\")\n          .addTo(map);\n\n    <\/script>\n<\/body>\n<\/html>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"392\" src=\"https:\/\/cthzs.cn\/wp-content\/uploads\/2025\/04\/1743660621-image.png\" alt=\"\" class=\"wp-image-477\" style=\"width:840px;height:auto\" srcset=\"https:\/\/loveyou.cthzs.cn\/wp-content\/uploads\/2025\/04\/1743660621-image.png 645w, https:\/\/loveyou.cthzs.cn\/wp-content\/uploads\/2025\/04\/1743660621-image-300x182.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u74e6\u7247\u5730\u56fe\u91d1\u5b57\u5854\u6a21\u578b\u662f\u4e00\u79cd\u591a\u5206\u8fa8\u7387\u5c42\u6b21\u6a21\u578b\uff0c\u4ece\u74e6\u7247\u91d1\u5b57\u5854\u7684\u5e95\u5c42\u5230\u9876\u5c42\uff0c\u5206\u8fa8\u7387\u8d8a\u6765\u8d8a\u4f4e\uff0c\u4f46\u8868\u793a\u7684\u5730\u7406\u8303\u56f4\u4e0d\u53d8\u3002&nbsp;\u9996\u5148\u786e\u5b9a\u5730\u56fe &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-424","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=424"}],"version-history":[{"count":31,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions\/486"}],"wp:attachment":[{"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loveyou.cthzs.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}