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

  • <tfoot id='bjFdf'></tfoot>

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

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

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

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

        如何使用 tabletop.js 將標記添加到傳單地圖?

        How to add markers to leaflet map with tabletop.js?(如何使用 tabletop.js 將標記添加到傳單地圖?)

          1. <legend id='w0Hho'><style id='w0Hho'><dir id='w0Hho'><q id='w0Hho'></q></dir></style></legend>
              <bdo id='w0Hho'></bdo><ul id='w0Hho'></ul>
              <tfoot id='w0Hho'></tfoot>
            • <small id='w0Hho'></small><noframes id='w0Hho'>

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

                  本文介紹了如何使用 tabletop.js 將標記添加到傳單地圖?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用這個非常好的指南將標記從 Google 工作表添加到基本的 leaflet.js 地圖:https://rdrn.me/leaflet-maps-google-sheets/

                  I'm using this quite nice guide to add markers from a Google sheet to a basic leaflet.js map: https://rdrn.me/leaflet-maps-google-sheets/

                  問題是,使用這些代碼片段,我在控制臺中記錄并返回了所有數據,但地圖本身上沒有出現任何點.

                  The problem is, using these code snippets here i get all the data logged and returned in the console, but none of the points appear on the map itself.

                  這可能是一些我看不到的非常基本的 JavaScript 問題.不好意思,還在學習.

                  This is probably some really basic JavaScript issue that i'm not able to see. Sorry, still learning.

                  這是一個 jfiddle,鏈接到帶有一個標記點??的演示表

                  Here's a jfiddle, linking to a demo sheets with one marker point

                  https://jsfiddle.net/xfs19cz7/1/

                  與地圖部分:

                  function init() {
                      Tabletop.init({
                          key: '*url to gsheets here*',
                          callback: myFunction,
                          simpleSheet: true
                      })
                  }
                  
                  window.addEventListener('DOMContentLoaded', init)
                  
                  function myFunction(data, tabletop) {
                      console.log(data);
                  }
                  
                  
                  var map = L.map('map-div').setView([64.6220498,25.5689638], 5);
                  var basemap = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                          attribution: 'Basemap (c) <a ,
                          minZoom: 5,
                          maxZoom: 18
                      });
                  basemap.addTo(map);
                  
                  function addPoints(data, tabletop) {
                      for (var row in data) {
                          var marker = L.marker([
                              data[row].Latitude,
                              data[row].Longitude
                          ]).addTo(map);
                          marker.bindPopup('<strong>' + data[row].Info + '</strong>');
                      }
                  }
                  

                  這應該在基本地圖上增加一個點.現在實際上地圖根本沒有渲染,也沒有顯示任何標記.我在使地圖顯示為空白的代碼中找不到任何問題,但可能存在一些問題.

                  This should add one point to a basic map. Now actually the map is not at all rendered, and no marker shows up. I can't find any issues in the code making the map show up blank, but there probably are some.

                  然而,來自 gsheets 的標記已記錄在控制臺中,我懷疑我的代碼中缺少與真正基本的 javascript 函數/循環/草率語法有關的內容.

                  The marker from gsheets is however logged in the console, i suspect there is something missing in my code relating to really basic javascript functions / looping / sloppy syntax.

                  還嘗試將 init() 和 addPoints(data, tabletop) 部分添加到我擁有的地圖中,該地圖具有相同的底圖鏈接,渲染正常.添加它仍然會留下地圖渲染,但沒有出現任何標記.同樣,gsheets 被加載為對象數組.

                  Also tried the init() and addPoints(data, tabletop) parts to a map i had where the map with the same basemap link, which rendereded OK. Adding this still left the map rendering, but no markers showed up. Again, the gsheets was loaded as an array of objects.

                  誰能指出我在代碼中可能非常基本的問題?

                  Could anyone point me to this, probably very basic, issue in the code?

                  callback: myFunction, 
                  

                  上面一行需要改成

                  callback: addPoints,
                  

                  另外,需要調用初始化函數并將位置設置為絕對位置.感謝您在下面標記為正確的答案中的工作小提琴.

                  also, init function needs to be called and position set to absolute. Thanks for the working fiddle in answer marked as correct below.

                  推薦答案

                  修復

                  • 嘗試設置地圖位置絕對
                  • 調用init()函數

                  工作小提琴

                  這篇關于如何使用 tabletop.js 將標記添加到傳單地圖?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

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

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

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

                            <tbody id='rHYft'></tbody>

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

                            主站蜘蛛池模板: 亚洲成人久久久 | 欧美小视频在线观看 | 人人玩人人添人人澡欧美 | 亚洲视频在线观看 | 国产日产久久高清欧美一区 | 午夜影院在线 | 久久精品亚洲一区二区三区浴池 | 欧美精品久久久久 | 在线视频一区二区三区 | 成人免费淫片aa视频免费 | www.国产.com | 中文字幕 亚洲一区 | 国产成人精品免费视频大全最热 | 婷婷久久久久 | 欧美高清免费 | 精品国产不卡一区二区三区 | 国产午夜av片| 一区二区三区四区不卡 | 成人精品国产免费网站 | 日本a在线| 精品久久99 | 精品国产一区二区国模嫣然 | 亚洲欧美一区二区三区在线 | 日韩欧美网 | 欧美在线天堂 | 天天天操天天天干 | 亚洲精品久 | 国产午夜精品久久 | 中文在线视频观看 | 欧美久| 欧美日韩国产精品激情在线播放 | 91av在线免费播放 | 欧美 日韩精品 | 亚洲不卡av在线 | 亚洲高清在线 | 中文字幕第二区 | 日日操夜夜操天天操 | 亚洲网站在线观看 | 日韩成人在线播放 | 国产在线中文字幕 | 中文字幕在线观看一区 |