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

<tfoot id='FEh9t'></tfoot>

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

        <bdo id='FEh9t'></bdo><ul id='FEh9t'></ul>
    1. <small id='FEh9t'></small><noframes id='FEh9t'>

    2. <i id='FEh9t'><tr id='FEh9t'><dt id='FEh9t'><q id='FEh9t'><span id='FEh9t'><b id='FEh9t'><form id='FEh9t'><ins id='FEh9t'></ins><ul id='FEh9t'></ul><sub id='FEh9t'></sub></form><legend id='FEh9t'></legend><bdo id='FEh9t'><pre id='FEh9t'><center id='FEh9t'></center></pre></bdo></b><th id='FEh9t'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FEh9t'><tfoot id='FEh9t'></tfoot><dl id='FEh9t'><fieldset id='FEh9t'></fieldset></dl></div>
      1. 傳單:不要在雙擊時觸發點擊事件功能

        leaflet: don#39;t fire click event function on doubleclick(傳單:不要在雙擊時觸發點擊事件功能)
      2. <legend id='p0GwJ'><style id='p0GwJ'><dir id='p0GwJ'><q id='p0GwJ'></q></dir></style></legend>

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

                <tfoot id='p0GwJ'></tfoot>

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

                    <tbody id='p0GwJ'></tbody>

                  本文介紹了傳單:不要在雙擊時觸發點擊事件功能的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個關于點擊傳單中地圖的問題.如果我點擊地圖我想在那里設置一個標記,但如果我雙擊地圖我只想放大而不設置標記.所以我有以下代碼:

                  I have a question concerning clicks on a map in leaflet. If I click on the map I want to set a marker there, but if doubleclick on the map I just want to zoom in without setting a marker. So I have the follwing code:

                  var map = L.map(attrs.id, {
                              center: [scope.lat, scope.lng],
                              zoom: 14
                          });
                  var marker = L.marker([scope.lat, scope.lng],{draggable: true});
                  map.on('click', function(event){
                              marker.setLatLng(event.latlng);
                              marker.addTo(map);                
                          });
                  

                  現在的問題是,當我在地圖上雙擊時,點擊事件也會被觸發,我想刪除該行為.我怎樣才能做到這一點?

                  The problem now is, when I doublclick on the map the click event is also fired and I would like to remove that behavior. How can I achieve that?

                  謝謝瑪格達

                  推薦答案

                  所以,我找到了一種方法來做到這一點,我仍然不確定是否有更好的方法來做到這一點.

                  So, I found a way to do that, I am still not sure, if there is a better way to do it.

                  var map = L.map(attrs.id, {
                          center: [scope.lat, scope.lng],
                          zoom: 14
                      });
                  map.clicked = 0;                                                                      
                  L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                          maxZoom: 18
                      }).addTo(map);
                  var marker = L.marker([scope.lat, scope.lng],{draggable: true});
                  map.on('click', function(event){
                      map.clicked = map.clicked + 1;
                      setTimeout(function(){
                          if(map.clicked == 1){
                              marker.setLatLng(event.latlng);
                              marker.addTo(map);                
                              map.clicked = 0;
                          }
                       }, 300);
                  });
                  map.on('dblclick', function(event){
                      map.clicked = 0;
                      map.zoomIn();
                  });
                  

                  這篇關于傳單:不要在雙擊時觸發點擊事件功能的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)
                    1. <small id='5XapY'></small><noframes id='5XapY'>

                      • <bdo id='5XapY'></bdo><ul id='5XapY'></ul>
                      • <legend id='5XapY'><style id='5XapY'><dir id='5XapY'><q id='5XapY'></q></dir></style></legend>
                          <tbody id='5XapY'></tbody>

                          1. <tfoot id='5XapY'></tfoot>

                            <i id='5XapY'><tr id='5XapY'><dt id='5XapY'><q id='5XapY'><span id='5XapY'><b id='5XapY'><form id='5XapY'><ins id='5XapY'></ins><ul id='5XapY'></ul><sub id='5XapY'></sub></form><legend id='5XapY'></legend><bdo id='5XapY'><pre id='5XapY'><center id='5XapY'></center></pre></bdo></b><th id='5XapY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5XapY'><tfoot id='5XapY'></tfoot><dl id='5XapY'><fieldset id='5XapY'></fieldset></dl></div>
                            主站蜘蛛池模板: 中文字幕视频在线观看 | 国产一区在线免费观看视频 | 国产精品亚洲综合 | 龙珠z在线观看 | av黄色在线 | 国产99在线 | 欧美 | 国产精品视频在线播放 | 瑞克和莫蒂第五季在线观看 | 久久国产精品视频 | 国产精品国产亚洲精品看不卡15 | 久久久精 | 欧美成人免费在线 | 日韩综合网 | 草比av| 亚洲精品久久久一区二区三区 | 偷拍自拍在线观看 | 欧美不卡在线 | 国产97在线看| 欧美日韩一卡二卡 | 成人一级片在线观看 | 丝袜 亚洲 另类 欧美 综合 | 国产91黄色 | 久久国 | 一区二区三区视频在线观看 | 国产区在线视频 | 日韩精品在线看 | 日韩伦理电影免费在线观看 | 久久在线看 | 国产精品国产a | 欧美一区二区三区大片 | 成人aaa视频| 日韩欧美在线观看视频 | 亚洲精品久久久 | av看片网站 | 久久高清精品 | 久久久久久高清 | 四虎影院新地址 | 国产福利一区二区 | 日本福利视频免费观看 | 日韩精品在线免费观看视频 | 97精品视频在线 |