简体   繁体   English

在内部加载Google Map页面网址<div>

[英]Loading Google Map Page Url inside <div>

I am unable to load the google map page url inside div tag. 我无法在div标签中加载Google地图页面网址。

EX: $(".map_holder").load(' https://www.google.co.in/maps/place/India/@21.1289956,82.7792201,4z/data=!3m1!4b1!4m2!3m1!1s0x30635ff06b92b791:0xd78c4fa1854213a6 '); 例如:$(“。map_holder”)。load(' https://www.google.co.in/maps/place/India/@21.1289956,82.7792201,4z/data=!3m1!4b1!4m2!3m1!1s0x30635ff06b92b791 :0xd78c4fa1854213a6 ');

I am getting "XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' http://test.com:8887 ' is therefore not allowed access. " In crome browser. 我收到“ XMLHttpRequest无法加载,所请求的资源上没有'Access-Control-Allow-Origin'标头。因此,不允许访问源' http://test.com:8887 '。”在crome浏览器中。

In firefox nothing is happening. 在Firefox中什么也没有发生。

Please help me with this. 请帮我解决一下这个。

Thank you. 谢谢。

如果您想与Google Maps集成,则可以使用其API: https : //developers.google.com/maps/documentation/javascript/examples/map-simple-async或嵌入iframe(单击设置轮,然后“共享并嵌入”以获得现成的iframe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM