调整地图选择,标记选的初始化

This commit is contained in:
cloud 2020-12-10 14:23:34 +08:00
parent 8afe826976
commit a4b7260db8
2 changed files with 9 additions and 9 deletions

View File

@ -372,12 +372,12 @@ var APPMAP;
_this.villageFilterList = {};
_this.villageList = {};
$('#selectMapId').on('shown.bs.modal', function () {
if (!_this.selectMapInitType)
_this.setHeight();
if (_this.selectMapInitType)
return false;
_this.setHeight();
setTimeout(function () {
document.body.scrollTop = document.documentElement.scrollTop = 0;
if (!_this.selectMapInitType)
_this.selectInitMap();
_this.selectInitMap();
_this.ajaxlnglatList(_this.selectMap, {
id: '',
province: _this.selectProv,
@ -385,8 +385,7 @@ var APPMAP;
district: _this.selectDist,
allinfo: 'all'
}, true);
if (!_this.selectMapInitType)
_this.drawingManagerInit();
_this.drawingManagerInit();
_this.drawingManager.addEventListener("overlaycomplete", function (e) {
var overlay = e.overlay;
var hashCode = overlay.hashCode;

View File

@ -527,15 +527,16 @@ namespace APPMAP {
super();
//模态框
$('#selectMapId').on('shown.bs.modal', () => {
if(this.selectMapInitType) return false
// 设置地图高度,达到满屏效果
if (!this.selectMapInitType) this.setHeight()
this.setHeight()
// 延迟效果可以让模态框加载时看起来没有卡的感觉
setTimeout(() => {
// 解决因页面产品滚动条导致的点击地图获取的经纬度不准确问题
// 让滚动条回滚到顶部
document.body.scrollTop = document.documentElement.scrollTop = 0
// 初始化模态框
if (!this.selectMapInitType) this.selectInitMap()
this.selectInitMap()
// ajax查找 当前地区点的标注并添加在地图上
this.ajaxlnglatList(this.selectMap, {
id: '',
@ -545,7 +546,7 @@ namespace APPMAP {
allinfo: 'all'
}, true)
// 初始化绘制工具
if (!this.selectMapInitType) this.drawingManagerInit()
this.drawingManagerInit()
// 绘制结束后的回调
this.drawingManager.addEventListener("overlaycomplete", (e) => {
let overlay = e.overlay