<script type= "text/javascript" >
<!--
function displayMap() {
document.getElementById( "mymaps" ).style.height = "214px" ;
var address = document.getElementById( "lianxidizhi" ).value;
var map = new BMap.Map( "mymaps" );
var point = new BMap.Point(116.331398, 39.897445);
map.addControl( new BMap.NavigationControl());
map.addControl( new BMap.ScaleControl());
map.addControl( new BMap.OverviewMapControl());
map.enableScrollWheelZoom();
map.addControl( new BMap.MapTypeControl());
map.centerAndZoom(point, 12);
var myGeo = new BMap.Geocoder();
myGeo.getPoint( "" + address + "" , function (point) {
if (point) {
map.centerAndZoom(point, 16);
var marker = new BMap.Marker(point);
map.addOverlay(marker);
marker.enableDragging();
}
}, "" );
return false ;
}
</script>
|