【发布时间】:2016-07-08 13:55:56
【问题描述】:
我正在使用传单创建地图,但弹出窗口的文本看起来很模糊。 (Windows 7 Enterprise / Leaflet 0.7.7 / Google Chrome 版本 51.0.2704.79 m)
<script>
var mymap = L.map('mapid', {
center: [42.9050205, 1.8760075],
zoom: 9
});
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFsfdNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
maxZoom: 18,
attribution:
'museodelprado © <a href="http://www.museodelprado.es">www.museodelprado.es</a>',
id: 'mapbox.streets'
}).addTo(mymap);
var MuseosIcon = L.Icon.extend({
options: {
shadowUrl: L.Icon.Default.imagePath + '/marker-shadow.png',
iconSize: [38, 95],
shadowSize: [50, 64],
iconAnchor: [22, 94],
shadowAnchor: [4, 62],
popupAnchor: [-3, -76]
}
});
var greenIcon = new MuseosIcon({iconUrl: L.Icon.Default.imagePath + '/marker-icon-2x-green.png'}),
redIcon = new MuseosIcon({iconUrl: L.Icon.Default.imagePath + '/marker-icon-2x-red.png'}),
blueIcon = new MuseosIcon({iconUrl: L.Icon.Default.imagePath + '/marker-icon-2x-blue.png'}),
yellowIcon = new MuseosIcon({iconUrl: L.Icon.Default.imagePath + '/marker-icon-2x-yellow.png'});
L.marker([42.13675,1.93143],{icon: blueIcon,title: 'MAQ. 1'}).addTo(mymap)
.bindPopup( "The Museo del Prado is the main Spanish national art museum, located in central Madrid. <br> It features one of the world's finest collections of European art, <br> dating from the 12th century to the early 19th century, <br> based on the former Spanish Royal Collection").openPopup();
var popup = L.popup();
</script>
【问题讨论】:
-
您使用的是什么版本的传单和浏览器? Maybe you're hitting this bug
标签: leaflet