<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
.allmap { 240px;height: 180px;overflow: hidden;margin:0;}
#allmap { 100%;height: 100%;overflow: hidden;margin:0;}
#golist {display: none;}
@media (max-device- 780px){#golist{display: block !important;}}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=你的密钥"></script>
/**
* 路线导航
* @param longitude 目的地经度
* @param latitude 目的地纬度
* @return
*/
function navigate(longitude,latitude){
var pt = new BMap.Point(longitude,latitude);
var geoc = new BMap.Geocoder();
geoc.getLocation(pt, function(rs){
var addComp = rs.addressComponents;
var url="http://api.map.baidu.com/marker?location="+latitude+","
+longitude+"&title=门店位置&content="+addComp.province + addComp.city + addComp.district + addComp.street + addComp.streetNumber+"&output=html";
window.location.href = url;
});
}