我的位置

1

//初始化并加载地图
function initMap() {
      var center = defaultCenter;
      var zoom = defaultZoom;
      //
      map = new BMap.Map("map_canvas");
      map.addControl(new BMap.NavigationControl());//平移缩放控件
      map.addControl(new BMap.ScaleControl());//标尺
      map.addControl(new BMap.OverviewMapControl());//概览
      map.addControl(new BMap.MapTypeControl({mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP]}));//地图类型切换
      map.enableScrollWheelZoom();
      map.centerAndZoom(center, zoom);

  }

results matching ""

    No results matching ""