http:\/\/i.map.baidu.com\/api\/page\/poicorrect\/addpoipc?business_trigger=8&city_id=301&poi_name=%E4%B8%AD%E5%B1%B1%E4%B8%AD%E5%AD%A6-%E5%85%AC%E4%BA%A4%E8%BD%A6%E7%AB%99<\/a>
<\/p>
<\/p>
<\/p>
<\/p>
\u4e00\u4e2a\u6bd4\u8f83\u5b8c\u6574\u7684\u7ecf\u5e38\u7528\u5230\u7684\u767e\u5ea6\u5730\u56fe\u793a\u4f8b\uff1a<\/p>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text\/html; charset=utf-8" \/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" \/>
<style type="text\/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"\u5fae\u8f6f\u96c5\u9ed1";}
<\/style>
<script type="text\/javascript" src="http:\/\/api.map.baidu.com\/api?v=2.0&ak=\u4f60\u81ea\u5df1\u7684key"><\/script>
<!--\u6d4b\u8ddd\u79bb\u7528-->
<script type="text\/javascript" src="http:\/\/api.map.baidu.com\/library\/DistanceTool\/1.2\/src\/DistanceTool_min.js"><\/script>
<title>\u5730\u56fe\u5c55\u793a<\/title>
<\/head>
<body>
<div id="allmap"><\/div>
<\/body>
<\/html>
<script type="text\/javascript">
\/\/ \u767e\u5ea6\u5730\u56feAPI\u529f\u80fd
var map = new BMap.Map("allmap"); \/\/ \u521b\u5efaMap\u5b9e\u4f8b
var point = new BMap.Point(114.13429547417234, 22.574919563811855);\/\/\u6807\u6ce8\u70b9
map.centerAndZoom(point, 16); \/\/ \u521d\u59cb\u5316\u5730\u56fe,\u8bbe\u7f6e\u4e2d\u5fc3\u70b9\u5750\u6807\u548c\u5730\u56fe\u7ea7\u522b
map.addControl(new BMap.MapTypeControl()); \/\/\u6dfb\u52a0\u5730\u56fe\u7c7b\u578b\u63a7\u4ef6
map.setCurrentCity("\u6df1\u5733\u5e02\u6c34\u8d1d\u4e07\u5c71\u73e0\u5b9d\u56ed"); \/\/ \u8bbe\u7f6e\u5730\u56fe\u663e\u793a\u7684\u57ce\u5e02 \u6b64\u9879\u662f\u5fc5\u987b\u8bbe\u7f6e\u7684
map.enableScrollWheelZoom(true); \/\/\u5f00\u542f\u9f20\u6807\u6eda\u8f6e\u7f29\u653e
map.addControl(new BMap.NavigationControl());\/\/\u5de6\u4e0a\u63a7\u4ef6
\/\/\u6807\u6ce8
var marker = new BMap.Marker(point); \/\/ \u521b\u5efa\u6807\u6ce8
map.addOverlay(marker); \/\/ \u5c06\u6807\u6ce8\u6dfb\u52a0\u5230\u5730\u56fe\u4e2d
\/\/marker.setAnimation(BMAP_ANIMATION_BOUNCE); \/\/\u8df3\u52a8\u7684\u52a8\u753b
\/\/\u76d1\u542c\u6807\u6ce8\u4e8b\u4ef6
marker.addEventListener("click", function(e){
alert("\u5f53\u524d\u4f4d\u7f6e\uff1a" + e.point.lng + ", " + e.point.lat);
});
\/\/\u6258\u62fd\u7684\u6807\u6ce8
marker.enableDragging();
marker.addEventListener("dragend", function(e){
alert("\u5f53\u524d\u4f4d\u7f6e\uff1a" + e.point.lng + ", " + e.point.lat);
})
\/\/\u5730\u56fe\u4e0a\u52a0\u4fe1\u606f\u7a97\u53e3
var opts = {
width : 250, \/\/ \u4fe1\u606f\u7a97\u53e3\u5bbd\u5ea6
height: 100, \/\/ \u4fe1\u606f\u7a97\u53e3\u9ad8\u5ea6
title : "\u95ea\u76df\u73e0\u5b9d" \/\/ \u4fe1\u606f\u7a97\u53e3\u6807\u9898
}
var infoWindow = new BMap.InfoWindow("\u8fd9\u91cc\u662f\u5185\u5bb9\u533a", opts); \/\/ \u521b\u5efa\u4fe1\u606f\u7a97\u53e3\u5bf9\u8c61
map.openInfoWindow(infoWindow, map.getCenter()); \/\/ \u6253\u5f00\u4fe1\u606f\u7a97\u53e3
\/\/\u5de6\u4e0a\u89d2\u52a0\u6bd4\u4f8b\u5c3a
var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});\/\/ \u5de6\u4e0a\u89d2\uff0c\u6dfb\u52a0\u6bd4\u4f8b\u5c3a
map.addControl(top_left_control);
\/\/ \u6dfb\u52a0\u5e26\u6709\u5b9a\u4f4d\u7684\u5bfc\u822a\u63a7\u4ef6(\u5730\u56fe\u4e0a\u7684\u70b9\u51fb\u83b7\u53d6\u5f53\u524d\u4f4d\u7f6e)
var navigationControl = new BMap.NavigationControl({
\/\/ \u9760\u5de6\u4e0a\u89d2\u4f4d\u7f6e
anchor: BMAP_ANCHOR_TOP_LEFT,
\/\/ LARGE\u7c7b\u578b
type: BMAP_NAVIGATION_CONTROL_LARGE,
\/\/ \u542f\u7528\u663e\u793a\u5b9a\u4f4d
enableGeolocation: true
});
map.addControl(navigationControl);
\/\/ \u6dfb\u52a0\u5b9a\u4f4d\u63a7\u4ef6
var geolocationControl = new BMap.GeolocationControl();
geolocationControl.addEventListener("locationSuccess", function(e){
\/\/ \u5b9a\u4f4d\u6210\u529f\u4e8b\u4ef6
var address = '';
address += e.addressComponent.province;
address += e.addressComponent.city;
address += e.addressComponent.district;
address += e.addressComponent.street;
address += e.addressComponent.streetNumber;
alert("\u5f53\u524d\u5b9a\u4f4d\u5730\u5740\u4e3a\uff1a" + address);
});
geolocationControl.addEventListener("locationError",function(e){
\/\/ \u5b9a\u4f4d\u5931\u8d25\u4e8b\u4ef6
alert(e.message);
});
map.addControl(geolocationControl);
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\u6dfb\u52a0\u57ce\u5e02\u5217\u8868\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
\/*var mp = new BMap.Map("allmap");
var point = new BMap.Point(116.404, 39.915);
mp.centerAndZoom(point, 14);
mp.enableScrollWheelZoom();
mp.enableInertialDragging();
mp.enableContinuousZoom();
var size = new BMap.Size(10, 20);
mp.addControl(new BMap.CityListControl({
anchor: BMAP_ANCHOR_TOP_LEFT,
offset: size,
\/\/ \u5207\u6362\u57ce\u5e02\u4e4b\u95f4\u4e8b\u4ef6
\/\/ onChangeBefore: function(){
\/\/ alert('before');
\/\/ },
\/\/ \u5207\u6362\u57ce\u5e02\u4e4b\u540e\u4e8b\u4ef6
\/\/ onChangeAfter:function(){
\/\/ alert('after');
\/\/ }
}));
*\/
\/****************\u6d4b\u8ddd\u79bb***************\/
\/\/ \u767e\u5ea6\u5730\u56feAPI\u529f\u80fd
\/*var map = new BMap.Map("allmap");
map.centerAndZoom("\u4e07\u5c71\u73e0\u5b9d\u56ed",16);
var myDis = new BMapLib.DistanceTool(map);
map.addEventListener("load",function(){
myDis.open(); \/\/\u5f00\u542f\u9f20\u6807\u6d4b\u8ddd
\/\/myDis.close(); \/\/\u5173\u95ed\u9f20\u6807\u6d4b\u8ddd\u5927
});
*\/
<\/script>
<\/p>"}