百度地图地图定位:
demo:http://lbsyun.baidu.com/jsdemo.htm
在页面上引入js:
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=134db1b9cf1f1f2b4427210932b34dcb"></script>
加入div:
<div style="width:224px;height:180px;border:1px solid gray;margin:-5px auto" id="allmap"></div>
js:
//longlatitude为地图坐标 x,y
var array = longlatitude.split(',');
var x=array[0];
var y=array[1];
// 地图中心
var map = new BMap.Map("allmap");
var point = new BMap.Point(x,y);
map.centerAndZoom(point, 15);
// 创建点
var marker = new BMap.Marker(new BMap.Point(x,y));
map.addOverlay(marker);
此处为地图坐标,需要用经纬度转换为坐标。