如何在html网页里插入<百度个性化地图>??不是普通白底地图。请说明详细操作步骤。

难道没有人会这个嘛?
2025-03-02 08:11:15
推荐回答(1个)
回答1:







body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}


个性化地图







var map = new BMap.Map('allmap');
map.centerAndZoom(new BMap.Point(116.404269,39.916042), 12);

var  mapStyle ={ 
        features: ["road", "building","water","land"],//隐藏地图上的poi
        style : "dark"  //设置地图风格为高端黑,目前支持normal(默认样式),dark(深色样式),light(浅色样式)
    }
map.setMapStyle(mapStyle);
 
function checkhHtml5()   
        {   
            if (typeof(Worker) === "undefined")     
            {   
                if(navigator.userAgent.indexOf("MSIE 9.0")<=0)  
                   {  
                      alert("定制个性地图示例:IE9以下不兼容,推荐使用百度浏览器、chrome、firefox、safari、IE10");   
                   }  
                
            }  
        }
 checkhHtml5();     

相关问答