生活随笔
收集整理的這篇文章主要介紹了
对接百度地图API
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、準備工作
百度地圖開發文檔
<!DOCTYPE html>
<html lang=
"en">
<head><meta charset=
"UTF-8"><meta name=
"viewport" content=
"user-scalable=no, initial-scale=1.0"><meta http-equiv=
"X-UA-Compatible" content=
"ie=edge"><title>Hello World</title><style
type=
"text/css">html{height:100%}body{height:100%;margin:0px;padding: 0px}</style><script
type=
"text/javascript" src=
"http://api.map.baidu.com/api?v=2.0&ak=18w9Wpk8SKphulGgHbrsMKQV7ExOW1BS"></script>
</head>
<body><h1>5464654456</h1><div id=
"container"></div><script
type=
"text/javascript">var map = new BMap.Map(
"container");//創建地圖實例var point = new BMap.Point(116.404,39.915);//創建點坐標map.centerAndZoom(point,15);//初始化地圖,設置中心點坐標和地圖級別</script>
</body>
</html>
復制代碼地圖api
總結
以上是生活随笔為你收集整理的对接百度地图API的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。