在请求前后依次添加 $.ajaxSettings.async = false 与 $.ajaxSettings.async = true
$.ajaxSettings.async = false
$.get('./serve/custom_map_config.json', function(res) {
map.setMapStyleV2({ styleJson: res })
them = res
})
$.ajaxSettings.async = true
将ajax 转变成同步请求
最新推荐文章于 2021-06-04 02:08:27 发布