本人调用了百度地图的API接口,在Firefox本地可以测试成功,而chrome失败,怎么回事,而将页面上传到github-pages中显示,在firefox设置解除保护,可以正常显示,但在chrome却不能显示,控制台信息如下:4 Mixed Content: The page at 'https://lchreal6.github.io/fc...' was loaded over HTTPS, but requested an insecure script 'http://api.map.baidu.com/geoc...…3338585&location=23.0444612,113.3882067&output=json&pois=1&_=1474943338586'. This request has been blocked; the content must be served over HTTPS.调用接口代码如下$.getJSON('http://api.map.baidu.com/geocoder/v2/?ak=0FuoX30MFf7YMrdS5Wi9GGAcHBblKDuu&callback=?&location='+latitude+','+longitude+'&output=json&pois=1', function(res){ $("#location").html(res.result.addressComponent.city); yourCurCity = res.result.addressComponent.city;});该怎样解决才能在chrome上正常显示。
添加回答
举报
0/150
提交
取消