btyjj-inspection/src/main/resources/static/route/enterprise/get-enterprise-location.html
2025-08-29 10:46:05 +08:00

66 lines
2.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<base href="/inspection/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-body">
<div id="baiduMap" style="width: 100%; height: 436px;"></div>
</div>
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=pFMM3KjMlPlpzEGTXwB5vdj6cDCfB6Py"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var enterpriseId = top.restAjax.params(window.location.href).enterpriseId;
var lng = top.restAjax.params(window.location.href).lng;
var lat = top.restAjax.params(window.location.href).lat;
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 初始化内容
function initData() {
var map = new BMap.Map('baiduMap');
map.enableScrollWheelZoom();
map.enableContinuousZoom();
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.OverviewMapControl());
map.addControl(new BMap.MapTypeControl({
type: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP]
}));
var point = new BMap.Point(lng, lat);
map.centerAndZoom(point, 15);
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
initData();
$('.close').on('click', function() {
closeBox();
});
});
</script>
</body>
</html>