类列表



类 BigMap.MapSwitch

Constructor Attributes Constructor Name and Description
BigMap.MapSwitch(option)(text, options)
BigMap.MapSwitch(option)构造函数
方法
方法属性 方法名称和描述
初始化加载地图切换工具
拿到地图对象
类 详情
BigMap.MapSwitch(option)
BigMap.MapSwitch构造函数
Parameters:
要显示的内容
{json} options

{
  targetID: "Gongju",    //targetID必传项,需要在html写一个div容器,id为Gongju
  /* big,tianditu,baidu,gaode四种地图,可选传,传几种地图就显示几种地图的切换。 */
  big: {
     maptypename: "big",     // big下必传的固定的参数和内容"big"
     maptypespan: "大地图",     // big下必传的固定的参数和内容"大地图"
     vector: {   //vector, image为地图的图层类型
     Position: 0,   //排序(Show为true的图层的排序),位置为0在底部展开之后是放到右一的,依次往左排
     Show: true,  //true则底部会显示这个图层类型,false不显示。图层类型Show为false,不参与排序
     Classname: "normal",  //vector下必传固定参数,vector的都为"normal"
     Spantext: "地图",  //vector下必传固定参数,vector的都为"地图"
     },
     image: {
     Position: 1,   //排序
     Show: true,
     Classname: "satellite",  //image下必传固定参数,image的都为"satellite"
     Spantext: "卫星",  //image下必传固定参数,image的都为"satellite"
     },
  },
  tianditu: {   //tianditu,baidu,gaode跟big类似。
     maptypename: "tianditu",  //每种地图对应的maptypename,maptypespan是固定的(传了地图类型,这两个参数必须传)。
     maptypespan: "天地图",
     vector: {
     Position: 0,   //排序
     Show: true,
     Classname: "normal",  //每种图层类型对应的Classname,Spantext是固定的(传了图层类型,这两个参数必须传)
     Spantext: "地图",
     },
     image: {
     Position: 1,   //排序
     Show: false,
     Classname: "satellite",
     Spantext: "卫星",
     },
  },
  baidu: {
     maptypename: "baidu",
      maptypespan: "百度",
     vector: {
     Position: 1,   //排序
     Show: false,
     Classname: "normal",
     Spantext: "地图",
     },
     image: {
     Position: 0,   //排序
     Show: true,
     Classname: "satellite",
     Spantext: "卫星",
     },
  },
  gaode: {
     maptypename: "gaode",
     maptypespan: "高德",
     vector: {
     Position: 0,   //排序
     Show: true,
     Classname: "normal",
     Spantext: "地图",
     },
     image: {
     Position: 1,   //排序
     Show: true,
     Classname: "satellite",
     Spantext: "卫星",
     },
  },
  
  theMap: {  //地图配置参数,可选参数。不传会默认传四类地图。
     mapType: "gaode",  //默认地图,内容从"big","tianditu","baidu","gaode"四种地图选一种,不传则为默认地图“big”
     layerType: "vector",  //默认图层类型,内容从"vector"和 "image"选一种;不传则为默认图层“vector”;
     center: [114.78, 33.75],  //地图中心点,可选参数,不传则默认值为[115.78, 34.75]
     zoom: 4,  //地图层级,可选参数,不传则默认值为6
     maxZoom: 17,  //最大缩放层级,可选参数,不传则默认值为18
     minZoom: 2,  //最小缩放层级,可选参数,不传则默认值为1
  },
    //各种工具  //工具配置参数,可选
  bottomTool: {
     Show: true,  //底部工具栏是否显示,不传则默认值为true。
     Width: 100,  //底部图片的宽度,可选参数,不传则默认值为80。
     Height: 90,  //底部图片的高度,可选参数,不传则默认值为60。
     img: {
     vecImgurl: "",  //矢量地图底部显示图片本地链接,可选参数。
     sateImgurl: "",  //影像地图底部显示图片本地链接,可选参数。
     }
  },
  sideTool: {
     Show: false,  //侧边工具栏是否显示,可选参数,不传则默认true
  },
   topTool: {
      Show: false,  //顶部工具栏是否显示,可选参数,不传则默认true
   },
};
方法详情
{html} BigMap.MapSwitch(option).init()
获取InfoWindow窗口的内容
Parameters:
{json} option

BigMap.MapSwitch(option).olMapObject()
获取地图对象

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 19 2016 13:15:54 GMT+0800 (CST)