百度地图api 导航 代码html,网页嵌入百度地图和调用百度地图api展示拥堵代码

XX城市路况拥堵图

5f44669d9023f819b9cfa4031178418d.png

兰州市实时路况

$(function() {

var map = new BMap.Map("mapContainer");

map.centerAndZoom(new BMap.Point(103.840745,36.067329), 16);

var ctrl = new BMapLib.TrafficControl({

showPanel: false

});

map.addControl(new BMap.NavigationControl());

map.enableContinuousZoom(false);

map.enableScrollWheelZoom(false);

map.addControl(ctrl);

ctrl.setAnchor(BMAP_ANCHOR_BOTTOM_RIGHT);

ctrl.showTraffic();

});

//按坐标移动

function goPosition(xPos,yPos){

var mapa = new BMap.Map("mapContainer");

mapa.centerAndZoom(new BMap.Point(xPos,yPos), 16);

var ctrla = new BMapLib.TrafficControl({

showPanel: false

});

mapa.addControl(new BMap.NavigationControl());

mapa.enableContinuousZoom(false);

mapa.enableScrollWheelZoom(true);

mapa.addControl(ctrla);

ctrla.setAnchor(BMAP_ANCHOR_BOTTOM_RIGHT);

ctrla.showTraffic();

}

#mapContainer {width:949px;height:500px;}

.traffic_container {width:1010px;background-color:#FFF;}

.left_map_container{float:left;width:949px;border:1px solid #1970CF;}

.left_map_container h4{display:block;width:949px;height:33px;line-height:33px;text-indent:12px; overflow:hidden;padding:0px;margin:0px;background:url('images/bg1.gif') repeat-x left top;color:#FFF;}

.left_map_container h4 .traffic_status_icon {float:right;width:110px;height:34px;margin-top:0px;background:url('images/traffic_status.png') no-repeat center center;}

.BMap_cpyCtrl{display:none;}.anchorBL{display:none;}

兰州市实时路况
实时路况
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值