|
发表于 2020-3-25 11:33:07
|
显示全部楼层
您好,您的测试网站是https么?只有https方式才会有着问题,因为https模式下里面有http访问方式就会禁止,我尝试在\servers\webServer\x_desktop目录里的index.html的head头里加入:<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">,这样强制转换,能打开地图了,但是无法定位。网页f12调试里面报错如下
Uncaught TypeError: Cannot read property 'clearOverlays' of undefined
at Object.destroy (<anonymous>:1:706)
at Object.wrapper.extend.$owner (mootools-1.6.0_all.js:1380)
at Object.clearContent (<anonymous>:1:2559)
at Object.wrapper.extend.$owner (mootools-1.6.0_all.js:1380)
at Object.<anonymous> (<anonymous>:1:8792)
at Object._runCallback [as runCallback] (o2.js?v=-a0d8055:199)
at _requireJs (o2.core.js:60)
at _requireAppSingle (o2.core.js:168)
at Object._requireApp [as requireApp] (o2.core.js:185)
at Object.o2.xDesktop.requireApp (<anonymous>:1:91)
api0.map.bdimg.com/images/openhand.cur:1 Failed to load resource: the server responded with a status of 499 (Request has been forbidden by antivirus)
api0.map.bdimg.com/getmodules?v=2.0&t=20140707&mod=map_3dfppv,scommon_41feyh,mapclick_2gzfaj,oppc_desrwu,newvectordrawlib_qmni4u,style_hfbhis,tile_ehg05s,navictrl_s1owfk,control_ydgkiq,autocomplete_3xgzrz,citylistcontrol_t35bss,canvablepath_5134ed,common_2dd0c5,symbol_hqzn5e,marker_sezw30:1 Failed to load resource: the server responded with a status of 499 (Request has been forbidden by antivirus)
其实这个错误很简单处理,就是把百度地图的部分改成https的,按理来说,我在配置文件里设置了https方式,那么百度地图那边也应该自动转换为https的,但是咱们程序没有这么设置,版主能给反馈一下么?给一个解决方案?其实只要不是https网站就没这个问题。 |
|