久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='FJjrP'><tr id='FJjrP'><dt id='FJjrP'><q id='FJjrP'><span id='FJjrP'><b id='FJjrP'><form id='FJjrP'><ins id='FJjrP'></ins><ul id='FJjrP'></ul><sub id='FJjrP'></sub></form><legend id='FJjrP'></legend><bdo id='FJjrP'><pre id='FJjrP'><center id='FJjrP'></center></pre></bdo></b><th id='FJjrP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FJjrP'><tfoot id='FJjrP'></tfoot><dl id='FJjrP'><fieldset id='FJjrP'></fieldset></dl></div>
  • <small id='FJjrP'></small><noframes id='FJjrP'>

    <legend id='FJjrP'><style id='FJjrP'><dir id='FJjrP'><q id='FJjrP'></q></dir></style></legend>

      1. <tfoot id='FJjrP'></tfoot>

        • <bdo id='FJjrP'></bdo><ul id='FJjrP'></ul>

        圖片上的傳單自定義坐標

        Leaflet custom coordinates on image(圖片上的傳單自定義坐標)
      2. <i id='Kepwb'><tr id='Kepwb'><dt id='Kepwb'><q id='Kepwb'><span id='Kepwb'><b id='Kepwb'><form id='Kepwb'><ins id='Kepwb'></ins><ul id='Kepwb'></ul><sub id='Kepwb'></sub></form><legend id='Kepwb'></legend><bdo id='Kepwb'><pre id='Kepwb'><center id='Kepwb'></center></pre></bdo></b><th id='Kepwb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Kepwb'><tfoot id='Kepwb'></tfoot><dl id='Kepwb'><fieldset id='Kepwb'></fieldset></dl></div>

                <tbody id='Kepwb'></tbody>

              <small id='Kepwb'></small><noframes id='Kepwb'>

              1. <tfoot id='Kepwb'></tfoot>
              2. <legend id='Kepwb'><style id='Kepwb'><dir id='Kepwb'><q id='Kepwb'></q></dir></style></legend>
                  <bdo id='Kepwb'></bdo><ul id='Kepwb'></ul>

                • 本文介紹了圖片上的傳單自定義坐標的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個尺寸為 8576x8576px 的圖像,我想讓坐標匹配 1:1.我還想要圖像中心的坐標 0,0(現在中心是 -128,128).我也想顯示坐標.我想為用戶插入坐標放置一個定位按鈕,然后在地圖上找到它們.像這樣:http://xero-hurtworld.com/map_steam.php(我使用相同的圖像但更大).我設置的 tile 大小為 268px.

                  I have an image which size is 8576x8576px, and I want to make the coordinates match 1:1. Also I want the coordinates 0,0 in the center of the image (now the center is -128,128). And I want to show the coordinates too. I want to put a locate button for the user insert coordinates and then find them on the map. Something like this: http://xero-hurtworld.com/map_steam.php (I am using the same image but bigger). The tile size I made its 268px.

                  到目前為止我的代碼:

                  https://jsfiddle.net/ze62dte0/

                  <!DOCTYPE html>
                  <html>
                    <head>
                      <title>Map</title>
                      <meta charset="utf-8"/>
                      <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
                      <link rel="stylesheet"  />
                      <!--[if lte IE 8]>
                      <link rel="stylesheet"  />
                      <![endif]-->
                      <script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js" charset="utf-8"></script>
                      <script>
                        function init() {
                          var mapMinZoom = 0;
                          var mapMaxZoom = 3;
                          var map = L.map('map', {
                            maxZoom: mapMaxZoom,
                            minZoom: mapMinZoom,
                            crs: L.CRS.Simple
                          }).setView([0, 0], mapMaxZoom);
                  
                  
                  
                      window.latLngToPixels = function(latlng){
                      return window.map.project([latlng.lat,latlng.lng], window.map.getMaxZoom());
                      };
                      window.pixelsToLatLng = function(x,y){
                      return window.map.unproject([x,y], window.map.getMaxZoom());
                      };
                  
                          var mapBounds = new L.LatLngBounds(
                              map.unproject([0, 8576], mapMaxZoom),
                              map.unproject([8576, 0], mapMaxZoom));
                  
                          map.fitBounds(mapBounds);
                          L.tileLayer('{z}/{x}/{y}.jpg', {
                            minZoom: mapMinZoom, maxZoom: mapMaxZoom,
                            bounds: mapBounds,
                            noWrap: true,
                            tms: false
                          }).addTo(map);
                  
                          L.marker([0, 0]).addTo(map).bindPopup("Zero");
                  
                          L.marker([-128, 128]).addTo(map).bindPopup("center");
                  
                          var popup = L.popup();
                  
                          <!-- Click pop-up>
                          var popup = L.popup();
                  
                          function onMapClick(e) {
                              popup
                              .setLatLng(e.latlng)
                              .setContent("You clicked in " + e.latlng.toString ())
                              .openOn(map);
                          }
                  
                          map.on('click', onMapClick);
                  
                        }
                      </script>
                      <style>
                        html, body, #map { width:100%; height:100%; margin:0; padding:0; }
                      </style>
                    </head>
                    <body onload="init()">
                      <div id="map"></div>
                    </body>
                  </html>
                  

                  推薦答案

                  如果我理解正確,你想要一個類似于 L.CRS.Simple 的 CRS,它放置 tile 0/0/0(tile大小為 268px,即 8576/2?),這樣:

                  If I understand correctly, you want a CRS similar to L.CRS.Simple that places tile 0/0/0 (tile size 268px, which is 8576 / 2?) so that:

                  • 位置 [0, 0] 位于該圖塊的中心.
                  • 整個世界(即整個 tile 0/0/0)從位置 [-8576/2, -8576/2][8576/2, 8576/2].
                  • Position [0, 0] is at the center of that tile.
                  • The entire world (i.e. entire tile 0/0/0) goes from position [-8576/2, -8576/2] to [8576/2, 8576/2].

                  您只需要使用適當的轉換來調整 L.CRS.Simple,以說明 1/2? = 1/32(而不僅僅是 1)的比例和 8576 的偏移量* 1/32/2 = 268/2 = 134(而不是 0.5).

                  You would just need to adjust the L.CRS.Simple with the appropriate transformation, to account for this scale of 1/2? = 1/32 (instead of just 1) and offset of 8576 * 1/32 / 2 = 268 / 2 = 134 (instead of 0.5).

                  L.CRS.MySimple = L.extend({}, L.CRS.Simple, {
                    transformation: new L.Transformation(1 / 32, 134, -1 / 32, 134)
                  });
                  
                  var map = L.map('map', {
                    maxZoom: mapMaxZoom,
                    minZoom: mapMinZoom,
                    crs: L.CRS.MySimple
                  }).setView([0, 0], mapMaxZoom);
                  

                  演示:http://plnkr.co/edit/5SQqp7SP4nf8muPM5iso?p=preview(我使用 Plunker 而不是 jsfiddle,因為您提供了帶有 HTML 的完整頁面代碼,而 jsfiddle 希望您將 HTML、CSS 和 JavaScript 代碼拆分為單獨的塊).

                  Demo: http://plnkr.co/edit/5SQqp7SP4nf8muPM5iso?p=preview (I used Plunker instead of jsfiddle because you provided a full page code with HTML, whereas jsfiddle expects you to split your HTML, CSS and JavaScript codes into separate blocks).

                  至于顯示坐標和定位"按鈕,它很容易實現,因此與您提到的示例相似.如果您需要幫助,請隨時提出新問題.

                  As for showing the coordinates and a "locate" button, it would be quite easy to implement so that it is similar to the example you mention. Feel free to open new questions if you need help.

                  在上面的演示中,我使用 Leaflet.Coordinates 插件 來快速實現這兩個功能(參見地圖左下角的控件;您必須開始在地圖上移動鼠標才能顯示坐標;單擊該控件以打開編輯模式.

                  In the above demo, I used Leaflet.Coordinates plugin to implement quickly both functionalities (see the control on bottom left corner of the map; you have to start moving your mouse on the map for the coordinates to appear; click on that control to open the edition mode).

                  對于 Leaflet.Coordinates 插件,它將顯示的坐標經度包裹起來以保持在 [-180;180] 度.

                  As for the Leaflet.Coordinates plugin, it wraps displayed coordinates longitude to stay within [-180; 180] degrees.

                  在坐標不是度數的情況下,包裹經度沒有意義.

                  In your case where coordinates are not degrees, there is no point wrapping the longitude.

                  我認為這是造成點擊彈窗與控件坐標不一致的原因.

                  I think this is the cause for the discrepancy of coordinates between the click popup and the control.

                  只需修補插件代碼以防止包裝:

                  Simply patch the plugin code to prevent wrapping:

                  // Patch first to avoid longitude wrapping.
                  L.Control.Coordinates.include({
                    _update: function(evt) {
                      var pos = evt.latlng,
                        opts = this.options;
                      if (pos) {
                        //pos = pos.wrap(); // Remove that instruction.
                        this._currentPos = pos;
                        this._inputY.value = L.NumberFormatter.round(pos.lat, opts.decimals, opts.decimalSeperator);
                        this._inputX.value = L.NumberFormatter.round(pos.lng, opts.decimals, opts.decimalSeperator);
                        this._label.innerHTML = this._createCoordinateLabel(pos);
                      }
                    }
                  });
                  

                  更新的演示:http://plnkr.co/edit/M3Ru0xqn6AxAaSb4kIJU?p=preview

                  這篇關于圖片上的傳單自定義坐標的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                  Detect FLASH plugin crashes(檢測 FLASH 插件崩潰)
                • <legend id='X31B0'><style id='X31B0'><dir id='X31B0'><q id='X31B0'></q></dir></style></legend>
                    <tbody id='X31B0'></tbody>

                            <bdo id='X31B0'></bdo><ul id='X31B0'></ul>

                            <i id='X31B0'><tr id='X31B0'><dt id='X31B0'><q id='X31B0'><span id='X31B0'><b id='X31B0'><form id='X31B0'><ins id='X31B0'></ins><ul id='X31B0'></ul><sub id='X31B0'></sub></form><legend id='X31B0'></legend><bdo id='X31B0'><pre id='X31B0'><center id='X31B0'></center></pre></bdo></b><th id='X31B0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='X31B0'><tfoot id='X31B0'></tfoot><dl id='X31B0'><fieldset id='X31B0'></fieldset></dl></div>
                          • <tfoot id='X31B0'></tfoot>

                            <small id='X31B0'></small><noframes id='X31B0'>

                            主站蜘蛛池模板: 99re热精品视频 | 成在线人视频免费视频 | 91av入口| 欧美国产日韩一区 | 国产精品久久久久久久久图文区 | 成人毛片一区二区三区 | 一区日韩 | 免费九九视频 | 久久国内精品 | www.黄色网 | 久久久久久久久久久久久九 | 99re在线免费视频 | 国产日本精品视频 | 国产精品免费观看 | 日本三级电影在线观看视频 | 久产久精国产品 | 热久久999| 天天操,夜夜爽 | 啪啪av | 国产盗摄视频 | 欧美视频成人 | 亚洲综合色视频在线观看 | 一级一级一级毛片 | 国产精品高潮呻吟久久 | 精品欧美激情精品一区 | 人人做人人澡人人爽欧美 | 国产一区二区欧美 | 51ⅴ精品国产91久久久久久 | 日产久久 | 中文字幕在线精品 | 国产精品一区二区三区在线播放 | 精品国产一区二区三区成人影院 | 久久噜噜噜精品国产亚洲综合 | 一级欧美一级日韩片免费观看 | 国产一区二区在线91 | 亚洲手机视频在线 | 亚洲成人免费观看 | 久久久久久国产一区二区三区 | 亚洲视频免费一区 | 日日夜夜视频 | 黄色一级毛片 |