| | |
| | | <!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, |
| | | #mapCanvas { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | margin: 0; |
| | | z-index: 0; |
| | | font-size: 14px; |
| | | font-family: "微软雅黑"; |
| | | } |
| | | <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, |
| | | #mapCanvas { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | margin: 0; |
| | | z-index: 0; |
| | | font-size: 14px; |
| | | font-family: "微软雅黑"; |
| | | } |
| | | |
| | | .main_body { |
| | | border: 0; |
| | | margin: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | } |
| | | .main_body { |
| | | border: 0; |
| | | margin: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | } |
| | | |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | list-style: none; |
| | | } |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | list-style: none; |
| | | } |
| | | |
| | | #cpm { |
| | | width: 300px; |
| | | height: 100px; |
| | | position: absolute; |
| | | background-color: #ffffff; |
| | | display: none; |
| | | left: 50%; |
| | | top: 50%; |
| | | margin-left: -150px; |
| | | margin-top: -50px; |
| | | z-index: 11; |
| | | color: #000000; |
| | | border: 2px solid #FF7F50; |
| | | font-size: 28px; |
| | | line-height: 100px; |
| | | text-align: center; |
| | | } |
| | | #cpm { |
| | | width: 300px; |
| | | height: 100px; |
| | | position: absolute; |
| | | background-color: #ffffff; |
| | | display: none; |
| | | left: 50%; |
| | | top: 50%; |
| | | margin-left: -150px; |
| | | margin-top: -50px; |
| | | z-index: 11; |
| | | color: #000000; |
| | | border: 2px solid #FF7F50; |
| | | font-size: 28px; |
| | | line-height: 100px; |
| | | text-align: center; |
| | | } |
| | | |
| | | #data { |
| | | overflow: scroll; |
| | | width: 300px; |
| | | height: 400px; |
| | | top: 20px; |
| | | right: 5px; |
| | | position: absolute; |
| | | z-index: 1; |
| | | background-color: gainsboro; |
| | | opacity: 0.8; |
| | | border: 2px solid red; |
| | | } |
| | | #data { |
| | | overflow: scroll; |
| | | width: 300px; |
| | | height: 400px; |
| | | top: 20px; |
| | | right: 5px; |
| | | position: absolute; |
| | | z-index: 1; |
| | | background-color: gainsboro; |
| | | opacity: 0.8; |
| | | border: 2px solid red; |
| | | } |
| | | |
| | | .trr th, td { |
| | | border: 1px solid black; |
| | | text-align: center; |
| | | } |
| | | .trr th, td { |
| | | border: 1px solid black; |
| | | text-align: center; |
| | | } |
| | | |
| | | table { |
| | | border-collapse: collapse; |
| | | font-size: 12px; |
| | | } |
| | | table { |
| | | border-collapse: collapse; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | #details { |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 100px; |
| | | height: 30px; |
| | | right: 100px; |
| | | bottom: 5px; |
| | | font-size: 100%; |
| | | } |
| | | #details { |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 100px; |
| | | height: 30px; |
| | | right: 100px; |
| | | bottom: 5px; |
| | | font-size: 100%; |
| | | } |
| | | |
| | | #form { |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 100px; |
| | | height: 30px; |
| | | right: 200px; |
| | | bottom: 5px; |
| | | font-size: 100%; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" |
| | | src="http://api.map.baidu.com/api?v=2.0&ak=dmzBXk6VTBG1SKUvqSSEgGBU8HcuoajQ"></script> |
| | | <script type="text/javascript" src="../js/jquery.min.js"></script> |
| | | #form { |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 100px; |
| | | height: 30px; |
| | | right: 200px; |
| | | bottom: 5px; |
| | | font-size: 100%; |
| | | } |
| | | </style> |
| | | <script type="text/javascript" |
| | | src="http://api.map.baidu.com/api?v=2.0&ak=dmzBXk6VTBG1SKUvqSSEgGBU8HcuoajQ"></script> |
| | | <script type="text/javascript" src="../js/jquery.min.js"></script> |
| | | </head> |
| | | <body> |
| | | |
| | | <div id="data" style="display: none"> |
| | | <%--存放数据的表--%> |
| | | <table id="tab" style="border:1px solid black;width: 280px"> |
| | | </table> |
| | | <%--存放数据的表--%> |
| | | <table id="tab" style="border:1px solid black;width: 280px"> |
| | | </table> |
| | | </div> |
| | | |
| | | <form id="form"> |
| | | <label> |
| | | <select id="select"><!--下拉列表--> |
| | | <option value="zero" selected>所有</option> |
| | | <option value="one">0-20m</option> |
| | | <option value="two">21-40m</option> |
| | | <option value="three">41-60m</option><!--下拉选项中辛店为显示的选项--> |
| | | <option value="four">61-80m</option> |
| | | <option value="five">80m以上</option> |
| | | </select> |
| | | </label> |
| | | <label> |
| | | <select id="select"><!--下拉列表--> |
| | | <option value="zero" selected>所有</option> |
| | | <option value="one">0-20m</option> |
| | | <option value="two">21-40m</option> |
| | | <option value="three">41-60m</option><!--下拉选项中辛店为显示的选项--> |
| | | <option value="four">61-80m</option> |
| | | <option value="five">80m以上</option> |
| | | </select> |
| | | </label> |
| | | </form> |
| | | <button id="details" onclick="show()">详细数据</button> |
| | | <div class="main_body"> |
| | | <div id="cpm">查无落点</div> |
| | | <div id="mapCanvas"></div> <!-- 百度地图容器--> |
| | | <!-- 传sensorInfo,regionCode,regionName,monitorPoint,device--> |
| | | <div id="uavDroppointParams" style="display: none;"> |
| | | ${requestScope.uavDroppointParams} |
| | | </div> |
| | | <div id="cpm">查无落点</div> |
| | | <div id="mapCanvas"></div> <!-- 百度地图容器--> |
| | | <!-- 传sensorInfo,regionCode,regionName,monitorPoint,device--> |
| | | <div id="uavDroppointParams" style="display: none;"> |
| | | ${requestScope.uavDroppointParams} |
| | | </div> |
| | | </div> |
| | | </body> |
| | | </html> |
| | |
| | | showNoDroppoint(); |
| | | } |
| | | |
| | | $(function () { |
| | | var points = getPoints(trackPoints); |
| | | map.centerAndZoom(points, 17);// 根据经纬度显示地图的范围 |
| | | map.setViewport(points);// 根据提供的地理区域或坐标设置地图视野 |
| | | listen(trackPoints); |
| | | $("#select").change(function () { |
| | | map.clearOverlays(); |
| | | var val = $("#select").val(); |
| | | var arry = ""; |
| | | if (val == "one") { |
| | | arry = trackPointsOne; |
| | | } else if (val == "two") { |
| | | arry = trackPointsTwo; |
| | | } else if (val == "three") { |
| | | arry = trackPointsThree; |
| | | } else if (val == "four") { |
| | | arry = trackPointsFour; |
| | | } else if (val == "five") { |
| | | arry = trackPointsFive; |
| | | } else if (val == "zero") { |
| | | arry = trackPoints; |
| | | } |
| | | var zoom = map.getZoom(); |
| | | if (zoom > 17) { |
| | | addMarkers(arry); |
| | | } |
| | | addPolygon(getPoints(arry)); |
| | | listen(arry); |
| | | }) |
| | | }); |
| | | var points = getPoints(trackPoints); |
| | | map.centerAndZoom(points, 17);// 根据经纬度显示地图的范围 |
| | | map.setViewport(points);// 根据提供的地理区域或坐标设置地图视野 |
| | | listen(trackPoints); |
| | | $("#select").change(function () { |
| | | map.clearOverlays(); |
| | | var val = $("#select").val(); |
| | | var arry = ""; |
| | | if (val == "one") { |
| | | arry = trackPointsOne; |
| | | } else if (val == "two") { |
| | | arry = trackPointsTwo; |
| | | } else if (val == "three") { |
| | | arry = trackPointsThree; |
| | | } else if (val == "four") { |
| | | arry = trackPointsFour; |
| | | } else if (val == "five") { |
| | | arry = trackPointsFive; |
| | | } else if (val == "zero") { |
| | | arry = trackPoints; |
| | | } |
| | | var zoom = map.getZoom(); |
| | | if (zoom > 17) { |
| | | addMarkers(arry); |
| | | } |
| | | addPolygon(getPoints(arry)); |
| | | listen(arry); |
| | | }) |
| | | |
| | | function listen(arry) { |
| | | map.addEventListener("zoomend", function () { |