| | |
| | |
|
| | | <title><s:text name="HomePage"></s:text></title>
|
| | | <meta name="renderer" content="webkit">
|
| | | <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
| | | <!-- 导入百度地图API -->
|
| | | <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
|
| | | <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=QAerSFEiGDCx1oHPB7Z5XYcBHI6R3qwx"></script>
|
| | | <script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
|
| | | <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
|
| | | <script type="text/javascript" src="js/AreaRestriction_min.js"></script>
|
| | | <link href="css/basic.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/common.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/index_layout.css" type="text/css" rel="stylesheet" />
|
| | |
| | | }
|
| | | </style>
|
| | | <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
|
| | | |
| | | <script type="text/javascript" src="js/echarts.js"></script>
|
| | | <script type="text/javascript" src="js/createTab.js"></script>
|
| | |
|
| | |
| | | <jsp:include page="nav.jsp" flush="true"/>
|
| | | <!--导航结束-->
|
| | | <div id="content">
|
| | | <!-- <div id="mapStatusOpts" class="map-status-container">
|
| | | <div class="layui-form layui-form-pane">
|
| | | <label class="layui-form-label">机房类型</label>
|
| | | <div class="layui-input-inline">
|
| | | <select name="warnType" id="warnType">
|
| | | <option value="0">全部</option>
|
| | | <option value="1">落后</option>
|
| | | <option value="2">告警</option>
|
| | | <option value="3">延时</option>
|
| | | <option value="4">正常</option>
|
| | | </select>
|
| | | <!-- 地图内容筛选 -->
|
| | | <div class="map-info-panel-left">
|
| | | <div class="map-info-panel-content">
|
| | | <div class="map-info">
|
| | | <span>限制显示区域: </span><span class="k-point red" id="mapVsArea">中国</span>
|
| | | <span class="mr5">机房显示类型:</span><span class="k-point red" id="mapIconStyle">全部</span>
|
| | | </div>
|
| | | <div class="map-info-detail">
|
| | | <table>
|
| | | <tbody>
|
| | | <tr>
|
| | | <td class="w8em alg-c">机房显示类型:</td>
|
| | | <td>
|
| | | <select name="mapIconStyleSel" id="mapIconStyleSel">
|
| | | <option>全部</option>
|
| | | <option>已安装</option>
|
| | | <option>未安装</option>
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="map-info-footer alg-r">
|
| | | <button type="button" class="mr10 map-panel-hide" value="确定" id="mapPanelEn">确定</button>
|
| | | <button type="button" class="mr10 map-panel-hide" value="隐藏">隐藏</button>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div> -->
|
| | | </div>
|
| | | <div class="nav-map small">
|
| | | <!-- 电池分布图 -->
|
| | | <div class="china-map" id="map">
|
| | |
| | | centerMapByPoint(map); // 根据当前用户设定的位置显示中心点
|
| | | map.enableScrollWheelZoom();
|
| | | map.disableDoubleClickZoom();
|
| | | map.setMapStyle({style: 'grayscale'}); // 设置地图的风格
|
| | | //map.setMapStyle({style: 'grayscale'}); // 设置地图的风格
|
| | | // 添加地图类型控件
|
| | | map.addControl(new BMap.MapTypeControl());
|
| | | // 给地图添加工具条(地图-卫星-三维)和比例尺控件
|
| | |
| | | var menu = new BMap.ContextMenu();
|
| | | var txtMenuItem = [
|
| | | {
|
| | | text: '设置中心点',
|
| | | callback: function(e) {
|
| | | myConfirm.show({
|
| | | title: '设置地图默认显示位置',
|
| | | content: '是否确认修改地图默认中心坐标',
|
| | | enfun:updateMapCenterPoint,
|
| | | enparams:[e]
|
| | | });
|
| | | }
|
| | | },
|
| | | {
|
| | | text: '搜索地址',
|
| | | callback: function(e) {
|
| | | search.showSearch();
|
| | |
| | | smallMap();
|
| | | }
|
| | | },
|
| | | |
| | | {
|
| | | text: '设置中心点',
|
| | | text: '返回中心点',
|
| | | callback: function(e) {
|
| | | myConfirm.show({
|
| | | title: '设置地图默认显示位置',
|
| | | content: '是否确认修改地图默认中心坐标',
|
| | | enfun:updateMapCenterPoint,
|
| | | enparams:[e]
|
| | | });
|
| | | centerMapByPoint(map);
|
| | | }
|
| | | }
|
| | | },
|
| | | ];
|
| | | //console.info(getPermit('taskchange_edit_permit', permits)+"*******");
|
| | | if(getPermit('batt_map_edit_permit', permits)) {
|
| | |
| | | });
|
| | |
|
| | | $(window).resize(function() {
|
| | | console.log(123);
|
| | | getMapHt();
|
| | | });
|
| | | // 改变div的大小
|
| | |
| | | }
|
| | |
|
| | | // 生成地图图标
|
| | | function createMapDot(map, dotList) {
|
| | | function createMapDot(map, dotList, isTop) {
|
| | | // 清空覆盖物和对应的mk点
|
| | | mkList = [];
|
| | |
|
| | |
| | | //showMapPanel(target, dotList);
|
| | | searchPanelInfo(target);
|
| | | });
|
| | | |
| | | if(isTop) {
|
| | | mk.setTop(true);
|
| | | }
|
| | | |
| | | mkList.push(mk);
|
| | | // 向地图添加覆盖物
|
| | | map.addOverlay(mk);
|
| | |
| | | data: "json="+JSON.stringify(mapPages),
|
| | | success: function(result) {
|
| | | var data = JSON.parse(result.result);
|
| | | console.log(data);
|
| | | //console.log(data);
|
| | | for(var i=0; i<data.length; i++) {
|
| | | var _data = data[i];
|
| | | var _list = formatUpdateStation(_data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | console.log(updateStationData);
|
| | | createMapDot(map, updateStationData);
|
| | | //console.log(updateStationData);
|
| | | createMapDot(map, updateStationData, true);
|
| | |
|
| | | // 更新分页信息
|
| | | mapPages.pageCurr++;
|
| | | if(mapPages.pageCurr>mapPages.pageNum) {
|
| | | if(mapPages.pageCurr>mapPages.pageNum || updateStationData.length<mapPages.pageSize) {
|
| | | mapPages.pageCurr=1;
|
| | | mapPages.pageNew=false;
|
| | | }
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | var mapViewArea = GLOBAL.BMap.mapViewArea;
|
| | | // 显示默认区域-中国
|
| | | setMapViewArea(mapViewArea[0]); |
| | | // 设置地图的可视区域
|
| | | function setMapViewArea(data) {
|
| | | var left = new BMap.Point(data.left.lng, data.left.lat);
|
| | | var right = new BMap.Point(data.right.lng, data.right.lat);
|
| | | var b = new BMap.Bounds(left, right);
|
| | | try {
|
| | | BMapLib.AreaRestriction.setBounds(map, b);
|
| | | } catch (e) {
|
| | | alert(e);
|
| | | }
|
| | | }
|
| | | });
|
| | | </script>
|
| | | </html>
|