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

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

      • <bdo id='cMrQN'></bdo><ul id='cMrQN'></ul>
      <tfoot id='cMrQN'></tfoot>
      <legend id='cMrQN'><style id='cMrQN'><dir id='cMrQN'><q id='cMrQN'></q></dir></style></legend>
      1. <i id='cMrQN'><tr id='cMrQN'><dt id='cMrQN'><q id='cMrQN'><span id='cMrQN'><b id='cMrQN'><form id='cMrQN'><ins id='cMrQN'></ins><ul id='cMrQN'></ul><sub id='cMrQN'></sub></form><legend id='cMrQN'></legend><bdo id='cMrQN'><pre id='cMrQN'><center id='cMrQN'></center></pre></bdo></b><th id='cMrQN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='cMrQN'><tfoot id='cMrQN'></tfoot><dl id='cMrQN'><fieldset id='cMrQN'></fieldset></dl></div>
      2. 傳單只加載一個(gè)瓷磚

        Leaflet only loads one tile(傳單只加載一個(gè)瓷磚)

          <tfoot id='NgyBO'></tfoot>
              <tbody id='NgyBO'></tbody>
          1. <small id='NgyBO'></small><noframes id='NgyBO'>

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

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

                  本文介紹了傳單只加載一個(gè)瓷磚的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我對 Leaflet 有一個(gè)問題,它實(shí)際上支撐了我的整個(gè)工作.由于某些我無法解釋的原因,Leaflet 的 UI 已正確加載到我的英特爾 XDK 應(yīng)用程序中,但只加載了一個(gè)地圖圖塊 - 相同的代碼在另一個(gè)測試應(yīng)用程序中工作!現(xiàn)在,我已經(jīng)嘗試了我能做的一切,我希望這里有人能解決我的問題.

                  I have a problem with Leaflet that actually holds up my whole work. For some reasons I can not explain, the UI of Leaflet is correctly loaded in my Intel XDK app, but there is only one map tile loaded - the same code works in another test app! Now, that I tried everything I could do, I hope that someone here can solve my problem.

                  為了更好地理解,這里是我的leaflet.js 中的代碼(它不是leaflet.js,因?yàn)槲沂褂胠eaflet-src.js 作為腳本)和屏幕截圖應(yīng)用程序的地圖窗口.

                  For better understanding, here is the code in my leaflet.js (it isn't the leaflet.js, because I'm using the leaflet-src.js as script) and a screenshot of the map window of the app.

                  function initLeaflet() {
                  document.getElementById("map").setAttribute("style", "height:" + window.innerHeight + "px; width:" + window.innerWidth + "px;");
                  var map = L.map('map');
                  
                  L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', {
                      maxZoom: 18,
                      attribution: 'Map data &copy; <a >OpenStreetMap</a> contributors, ' +
                          '<a  +
                          'Imagery ? <a ,
                      id: 'examples.map-i875mjb7'
                  }).addTo(map);
                  
                  map.on('locationfound', onLocationFound);
                  map.on('locationerror', onLocationError);
                  
                  map.locate({setView: true, maxZoom: 16});
                  
                  map.on('click', onMapClick);
                  }
                  
                  function onLocationFound(e) {
                  var radius = e.accuracy / 2;
                  
                  L.marker(e.latlng).addTo(map)
                  .bindPopup("Position: " + e.latlng + " Genauigkeit " + radius ).openPopup();
                  
                  L.circle(e.latlng, radius).addTo(map);
                  }
                  
                  function onLocationError(e) {
                  alert(e.message);
                  }
                  
                  
                  function onMapClick(e) {
                  marker = new L.marker(e.latlng, {id:uni, icon:redIcon, draggable:'true'});
                  marker.on('dragend', function(event){
                      var marker = event.target;
                      var position = marker.getLatLng();
                      alert(position);
                      marker.setLatLng([position],{id:uni,draggable:'true'}).bindPopup(position).update();
                  });
                  map.addLayer(marker);
                  }     
                  
                  //var x = document.getElementById("demo");
                  
                  function getLocation() {
                  if (navigator.geolocation) {
                      navigator.geolocation.getCurrentPosition(showPosition);
                  } else { 
                      //x.innerHTML = "Geolocation is not supported by this browser.";
                  }
                  }
                  
                  function showPosition(position) {
                  //x.innerHTML = "Latitude: " + position.coords.latitude + 
                  //"<br>Longitude: " + position.coords.longitude;    
                  }
                  

                  http://imgur.com/exOUZuT

                  推薦答案

                  我猜是地圖初始化時(shí)的大小是罪魁禍?zhǔn)?

                  I would guess that the size of the map upon initialization is the culprit.

                  Leaflet 在初始化時(shí)需要知道它嵌入的元素的大小.Leaflet 使用該信息來了解要加載多少瓦片等.此外,對地圖大小的任何編程更改(或 Leaflet 無法輕易檢測到的更改)都必須遵循 map.invalidateSize(..) 鏈接.

                  Leaflet needs to know the size of the element it is embedded in when initializing. Leaflet uses that information to know how much tiles to load etc. Furthermore any programmatic changes (or changes that cannot be easily detected by Leaflet) to the size of the map have to be followed by map.invalidateSize(..) link.

                  我懷疑在您設(shè)置大小后,Leaflet 無法正確讀取 #map 元素的新大小.之后嘗試使大小無效或異步運(yùn)行初始化.我要補(bǔ)充:

                  I suspect that after you set the size, Leaflet fails to read properly the new size of the #map element. Try invalidating the size afterwards or run initialization asynchronously. I would add:

                  setTimeout(function () {
                      map.invalidateSize();
                  }, 0);
                  

                  并檢查它是否變得更好.

                  and check if it gets any better.

                  這篇關(guān)于傳單只加載一個(gè)瓷磚的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個(gè)多邊形點(diǎn)是否在傳單中的另一個(gè)內(nèi)部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性)
                  Trigger click on leaflet marker(觸發(fā)點(diǎn)擊傳單標(biāo)記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認(rèn)加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                      <tbody id='h6CaI'></tbody>
                    <legend id='h6CaI'><style id='h6CaI'><dir id='h6CaI'><q id='h6CaI'></q></dir></style></legend>
                    • <bdo id='h6CaI'></bdo><ul id='h6CaI'></ul>

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

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

                          • <tfoot id='h6CaI'></tfoot>
                            主站蜘蛛池模板: 日p视频免费看 | av日韩精品 | 黄色一级特级片 | 免费福利视频一区二区三区 | 亚洲天堂色 | www久久久 | 欧美日韩国产一区二区三区 | 日韩在线观看中文字幕 | 亚洲高清在线 | 欧美2区| 久亚州在线播放 | av无遮挡| 四虎最新 | 九九热在线视频免费观看 | 人人看人人搞 | 日韩欧美一级 | 97国产精品视频人人做人人爱 | 成人做爰www免费看视频网站 | 韩国av一区二区 | 日本一区二区高清视频 | 久久免费精彩视频 | 欧美福利 | www.亚洲精品 | 天天射色综合 | 成人av免费播放 | 国产精品视频免费观看 | 麻豆国产一区二区三区四区 | 国产一在线观看 | 成人免费观看男女羞羞视频 | h片免费在线观看 | 国产精品久久久久久久久久久新郎 | 成人a视频在线观看 | 亚洲 成人 在线 | 蜜桃免费一区二区三区 | 不卡在线一区 | 亚洲一区二区三区在线播放 | 91精品国产91久久久久福利 | h视频免费观看 | 美女久久视频 | 国产视频一区二区在线观看 | 亚洲电影第三页 |