39 lines
1.4 KiB
HTML
39 lines
1.4 KiB
HTML
{{include file="public/header" /}}
|
|
|
|
{{if !empty($params['lng']) and !empty($params['lat']) and $params['lng'] gt 0 and $params['lat'] gt 0}}
|
|
<div id="help-map"></div>
|
|
{{else /}}
|
|
<div class="table-no"><i class="am-icon-warning"></i> 参数有误</div>
|
|
{{/if}}
|
|
|
|
{{include file="public/footer" /}}
|
|
|
|
{{if !empty($params['lng']) and !empty($params['lat']) and $params['lng'] gt 0 and $params['lat'] gt 0}}
|
|
<!-- map -->
|
|
<script type="text/javascript" src="{{$Think.__MY_HTTP__}}://api.map.baidu.com/api?v=2.0&ak={{:MyC('common_baidu_map_ak')}}"></script>
|
|
|
|
<script type="text/javascript">
|
|
$(function()
|
|
{
|
|
// 丢失地址-地图展示
|
|
var map = new BMap.Map("help-map", {enableMapClick:false});
|
|
var level = 17;
|
|
var point = new BMap.Point({{$params['lng']}}, {{$params['lat']}});
|
|
map.centerAndZoom(point, level);
|
|
|
|
// 添加控件
|
|
var navigationControl = new BMap.NavigationControl({
|
|
// 靠左上角位置
|
|
anchor: BMAP_ANCHOR_TOP_LEFT,
|
|
// LARGE类型
|
|
type: BMAP_NAVIGATION_CONTROL_LARGE,
|
|
});
|
|
map.addControl(navigationControl);
|
|
|
|
// 创建标注
|
|
var marker = new BMap.Marker(point); // 创建标注
|
|
map.addOverlay(marker); // 将标注添加到地图中
|
|
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
|
|
});
|
|
</script>
|
|
{{/if}} |