Questions tagged «popup»


4
更改Leaflet标记上的弹出位置?
我想在Leaflet的标记图标底部打开一个弹出窗口。 我的代码: var mymap = L.map('mapid').setView([51.505, -0.09], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', { maxZoom: 18, attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + 'Imagery © <a href="http://mapbox.com">Mapbox</a>', id: 'mapbox.streets' }).addTo(mymap); var lati = 51.51; var longi = -0.09; var popupLocation1 = new L.LatLng(lati, longi); var popupContent1 = 'This …
14 leaflet  popup 

4
如何从其标记更新弹出内容?
我这样做是用Leaflet创建了一个弹出窗口: marker.bindPopup(content).openPopup(); 之后如何更新content值? 我想从标记中执行此操作,如下所示: marker.updatePopup(newContent);
11 leaflet  popup 

1
如何在弹出窗口中插入新行文本
我正在使用Leaflet Marker Cluster,并且我需要在弹出窗口中显示五行。但是,当我写这篇文章时,它们都在同一行。有人可以帮助我成为另一个人吗? var a = addressPoints[i]; var title = a[2]; var univ = a[3]; var direct = a[4]; var city = a[5]; var state = a[6]; var marker = new L.Marker(new L.LatLng(a[0], a[1]), { title: title } ); marker.bindPopup("Student: " + title + "University: " + univ + "Direction: …
9 leaflet  popup 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.