我正在创建一个带有传单的地图,但弹出窗口的文本显得模糊不清。 (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>
答案 0 :(得分:3)
我的浏览器缩放率不是100%(按Ctrl + 0)