dongyun7897 2016-07-15 11:18
浏览 19

Google GeoChart适用于一个域,而不适用于另一个域

I know this is a vague question but than again this is a vague problem.

I have a simple Google GeoChart like so:

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>


   <div id="regions_div" style="width: 900px; height: 500px;"></div>

<script>
  google.charts.load('current', {'packages':['geochart']});
  google.charts.setOnLoadCallback(drawRegionsMap);

  function drawRegionsMap() {

    var data = google.visualization.arrayToDataTable([
      ['Country', 'Popularity'],
      ['Germany', 200],
      ['United States', 300],
      ['Brazil', 400],
      ['Canada', 500],
      ['France', 600],
      ['RU', 700]
    ]);

    var options = {'displayMode': 'markers'};

    var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));

    chart.draw(data, options);
  }
</script>

you can find it here: https://jsfiddle.net/0rd3hp7a/

now here's the thing. I have 2 domains / url's linked to this .php file.

the map generates fine on one domain and on the other the map pops up but the green markers do not.

Both domains run under php 5.2.17 and the provider tells me that both domains have same settings ... which is hard to believe since they work differently of the SAME file.

Any ideas where I can look for the problem???

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题
    • ¥20 win11修改中文用户名路径
    • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
    • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
    • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
    • ¥15 帮我写一个c++工程
    • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
    • ¥15 关于smbclient 库的使用