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

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

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

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

        傳單Js自定義控制按鈕添加(文字,懸停)

        leaflet Js custom control button add (text, hover)(傳單Js自定義控制按鈕添加(文字,懸停))

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

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

                    <tbody id='VWaPy'></tbody>

                  <legend id='VWaPy'><style id='VWaPy'><dir id='VWaPy'><q id='VWaPy'></q></dir></style></legend>
                  本文介紹了傳單Js自定義控制按鈕添加(文字,懸停)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我遵循了 這個 control-button-leaflet 教程,它對我有用.現在我想:

                  1. 當我將鼠標懸停在按鈕上時顯示一些文本(例如使用縮放按鈕)
                  2. 當我將鼠標懸停在按鈕上時更改按鈕的顏色
                  3. 能夠在按鈕內寫入文本而不是圖像.

                  代碼如下:

                   var customControl = L.Control.extend({選項: {位置:左上角"},onAdd:函數(地圖){var container = L.DomUtil.create('div', 'leaflet-bar Leaflet-control Leaflet-control-custom');container.style.backgroundColor = '白色';container.style.backgroundImage = "url(http://t1.gstatic.com/images?q=tbn:ANd9GcR6FCUMW5bPn8C4PbKak2BJQQsmC-K9-mbYBeFZm1ZM2w2GRy40Ew)";container.style.backgroundSize = "30px 30px";container.style.width = '30px';container.style.height = '30px';container.onclick = 函數(){console.log('buttonClicked');}返回容器;}});變量映射;var readyState = 函數(e){map = new L.Map('map').setView([48.935, 18.14], 14);L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);map.addControl(new customControl());}window.addEventListener('DOMContentLoaded', readyState);

                  解決方案

                  看來你比 div 更需要 Button:

                   var container = L.DomUtil.create('input');容器.type="按鈕";

                  1. 然后就可以輕松設置鼠標懸停文本了:

                    container.title="沒有貓";

                  2. 還有一些文字而不是圖片:

                    container.value = "42";

                  3. 您可以使用鼠標事件來設置按鈕樣式:

                    container.onmouseover = function(){container.style.backgroundColor = '粉色';}容器.onmouseout = 函數(){container.style.backgroundColor = '白色';}

                  (你當然可以用 css 完成最后一部分,可能更優雅)

                  完整示例:http://codepen.io/anon/pen/oXVMvyp>

                  I followed this control-button-leaflet tutorial and it worked for me. Now I want to:

                  1. show some text when i hover over the button (like with the zoom buttons)
                  2. Change the color of the button when i hover over it
                  3. be able to write text inside the button instead of an image.

                  Here's the code:

                      var customControl =  L.Control.extend({        
                        options: {
                          position: 'topleft'
                        },
                  
                        onAdd: function (map) {
                          var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control leaflet-control-custom');
                  
                          container.style.backgroundColor = 'white';     
                          container.style.backgroundImage = "url(http://t1.gstatic.com/images?q=tbn:ANd9GcR6FCUMW5bPn8C4PbKak2BJQQsmC-K9-mbYBeFZm1ZM2w2GRy40Ew)";
                          container.style.backgroundSize = "30px 30px";
                          container.style.width = '30px';
                          container.style.height = '30px';
                  
                          container.onclick = function(){
                            console.log('buttonClicked');
                          }
                  
                          return container;
                        }
                      });
                  
                      var map;
                  
                      var readyState = function(e){
                        map = new L.Map('map').setView([48.935, 18.14], 14);
                        L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
                        map.addControl(new customControl());
                      }
                  
                      window.addEventListener('DOMContentLoaded', readyState);
                  

                  解決方案

                  It seems you more need a Button than a div:

                      var container = L.DomUtil.create('input');
                      container.type="button";
                  

                  1. Then you can easily set a mouseover text:

                    container.title="No cat";
                    

                  2. And some Text instead of an image:

                    container.value = "42";
                    

                  3. And you can use the mouse events to style the button:

                    container.onmouseover = function(){
                      container.style.backgroundColor = 'pink'; 
                    }
                    container.onmouseout = function(){
                      container.style.backgroundColor = 'white'; 
                    }
                    

                  (you could of course do this last part with css, might be more elegant)

                  Full example: http://codepen.io/anon/pen/oXVMvy

                  這篇關于傳單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 圖層控件添加到側邊欄)

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

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

                        • <bdo id='T2VI8'></bdo><ul id='T2VI8'></ul>
                          <tfoot id='T2VI8'></tfoot>
                            <tbody id='T2VI8'></tbody>
                          <legend id='T2VI8'><style id='T2VI8'><dir id='T2VI8'><q id='T2VI8'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 91视频免费观看 | 在线免费黄色小视频 | 日本黄色高清视频 | 一级全黄少妇性色生活免费看 | 国产美女一区二区 | 一区中文字幕 | 亚洲人成在线播放 | 中文天堂在线一区 | 亚洲精品66 | 亚洲精品68久久久一区 | 欧美综合网 | 亚洲天堂中文字幕 | www亚洲精品 | 久久不卡区 | 久久人人网 | 日韩成人一区 | 伊人久久综合 | 亚洲iv一区二区三区 | 99久久婷婷国产综合精品首页 | 日韩欧美字幕 | 久久大陆 | 伊人伊成久久人综合网站 | 波多野结衣精品 | 日日夜夜免费精品视频 | 国产精品久久久久久久久久尿 | 日韩性在线 | 天天干天天色 | 国产一区二区三区四区五区加勒比 | www中文字幕 | 亚洲高清av在线 | 蜜月aⅴ免费一区二区三区 99re在线视频 | 99久久久99久久国产片鸭王 | 亚洲精品视频在线观看视频 | 成人久久久 | 国产高清美女一级a毛片久久w | 日韩一区三区 | 亚洲乱码一区二区三区在线观看 | 一级黄在线观看 | 久久性色| 中文在线视频观看 | 精品久久久久久亚洲综合网 |