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

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

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

<tfoot id='GOTXb'></tfoot>

<legend id='GOTXb'><style id='GOTXb'><dir id='GOTXb'><q id='GOTXb'></q></dir></style></legend>
    • <bdo id='GOTXb'></bdo><ul id='GOTXb'></ul>

      如何在“popupopen"事件期間識別 Leaflet 的標(biāo)記

      How to identify Leaflet#39;s Marker during a `popupopen` event?(如何在“popupopen事件期間識別 Leaflet 的標(biāo)記?)
      <i id='93iGi'><tr id='93iGi'><dt id='93iGi'><q id='93iGi'><span id='93iGi'><b id='93iGi'><form id='93iGi'><ins id='93iGi'></ins><ul id='93iGi'></ul><sub id='93iGi'></sub></form><legend id='93iGi'></legend><bdo id='93iGi'><pre id='93iGi'><center id='93iGi'></center></pre></bdo></b><th id='93iGi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='93iGi'><tfoot id='93iGi'></tfoot><dl id='93iGi'><fieldset id='93iGi'></fieldset></dl></div>
      • <tfoot id='93iGi'></tfoot>
              <tbody id='93iGi'></tbody>

            • <small id='93iGi'></small><noframes id='93iGi'>

              <legend id='93iGi'><style id='93iGi'><dir id='93iGi'><q id='93iGi'></q></dir></style></legend>

                <bdo id='93iGi'></bdo><ul id='93iGi'></ul>
              • 本文介紹了如何在“popupopen"事件期間識別 Leaflet 的標(biāo)記?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                當(dāng)一個標(biāo)記被點(diǎn)擊時,我需要執(zhí)行一些代碼,找到與被點(diǎn)擊的標(biāo)記對應(yīng)的 id ,從后端 API 檢索數(shù)據(jù),然后將新檢索到的數(shù)據(jù)添加到 將打開的彈出窗口的內(nèi)容.

                when a marker is clicked, I need to execute some code that finds the id corresponding to the marker being clicked , retrieves data from backend API, then adds the newly retrieved data to the content of the popup that will open.

                能夠監(jiān)聽標(biāo)記上的點(diǎn)擊事件的唯一方法是

                The only way that is able to listen to a click event on the marker is

                map.on('popupopen', function(e){
                    // How to retrieve marker?
                    // eg: Assign an id on creation, retrieve it now during popupopen
                };)
                

                我怎樣才能知道這是哪個標(biāo)記?是否可以為每個標(biāo)記添加 id 屬性,然后在 popupopen 事件期間檢索此 id?

                How can I find out which marker this is? Is it possible to add an id attribute to each marker, then retrieve this id during the popupopen event?

                推薦答案

                事件對象包含一個popup"屬性,該屬性具有一個名為_source"的私有屬性,該屬性是彈出窗口綁定到的對象(即標(biāo)記).由于 _source 應(yīng)該是私有的,這似乎不是正確的方法,但我不知道該怎么做.

                The event object contains a "popup" attribute that has a private attribute called "_source" which is the object that the popup is bound to (i.e. the marker). Since _source is supposed to be private this doesn't seem like the right way but I'm not sure how else to do it.

                map.on('popupopen', function(e) {
                  var marker = e.popup._source;
                });
                

                這篇關(guān)于如何在“popupopen"事件期間識別 Leaflet 的標(biāo)記?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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(檢查一個多邊形點(diǎn)是否在傳單中的另一個內(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)加載磁貼顏色?)
                Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標(biāo)記的緯度和經(jīng)度)
                <i id='j4uQF'><tr id='j4uQF'><dt id='j4uQF'><q id='j4uQF'><span id='j4uQF'><b id='j4uQF'><form id='j4uQF'><ins id='j4uQF'></ins><ul id='j4uQF'></ul><sub id='j4uQF'></sub></form><legend id='j4uQF'></legend><bdo id='j4uQF'><pre id='j4uQF'><center id='j4uQF'></center></pre></bdo></b><th id='j4uQF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='j4uQF'><tfoot id='j4uQF'></tfoot><dl id='j4uQF'><fieldset id='j4uQF'></fieldset></dl></div>

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

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

                      <tfoot id='j4uQF'></tfoot>
                        <tbody id='j4uQF'></tbody>

                      • <legend id='j4uQF'><style id='j4uQF'><dir id='j4uQF'><q id='j4uQF'></q></dir></style></legend>
                          主站蜘蛛池模板: 亚洲高清av | 一级美国黄色片 | 精品国产乱码久久久久久88av | 国产精品一区二区av | 精品一区二区三区免费毛片 | 亚洲国产欧美在线人成 | 成人久久18免费网站 | 成人免费影院 | 91精品一区| 精品国产免费一区二区三区演员表 | 国产精品美女久久久久久免费 | 精品一区二区久久久久久久网站 | 老牛嫩草一区二区三区av | 久久精品视频免费观看 | 亚洲精品性视频 | 91麻豆精品一区二区三区 | 激情综合五月天 | 国产一区二区精品在线 | www.色.com| 一级少妇女片 | 日韩一区二区三区在线观看视频 | 久久久久国产精品午夜一区 | 精品伊人久久 | 国产精品一区二区三区四区 | 在线观看视频91 | 99久9 | 中文字幕国产精品 | 亚洲精品乱码久久久久久按摩观 | 色婷婷亚洲 | 亚洲精品成人 | 欧美激情一区 | 国产农村妇女精品一区 | 欧美综合久久 | 91免费看片 | 午夜视频免费在线观看 | 色中文在线 | 一区二区在线免费观看视频 | 免费黄色日本 | 三级视频在线观看电影 | 高清黄色 | 亚洲香蕉在线视频 |