简体   繁体   English

移动浏览器上的传单地图呈灰色

[英]Leaflet map grey on mobile browsers

This leaflet map is working fine on desktop browsers, it is not on mobile browsers, don't understand where is the error!这个传单地图在桌面浏览器上工作正常,在移动浏览器上不行,不明白错误在哪里!

var map = new L.Map("tour-map",{ zoomControl: false, maxZoom: 15 });

var basemaps = {
    opentopomap: L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png'),
    hikebike: L.tileLayer('http://{s}.tiles.wmflabs.org/hikebike/{z}/{x}/{y}.png'),
    worldimagery: L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}')
};

L.control.layers(basemaps).addTo(map);

basemaps.opentopomap.addTo(map);

Chrome console doesn't show any errors... Chrome 控制台没有显示任何错误...

This is the css:这是CSS:

#tour-map { position: relative; margin: 0 auto; width: 100%; height: 360px; }

The problem was caused by mixing HTTP and HTTPS protocols.该问题是由混合使用 HTTP 和 HTTPS 协议引起的。 Thanks a lot to ghybs for helping me!非常感谢 ghbs 帮助我!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM