3

I have my display divided in two parts: upper part, 70%, is a Google map with API loaded via

<script src="https://maps.googleapis.com/maps/api/jskey=API_KEY&callback=initMap" async defer></script>

at the bottom I would like to have a chart which I have to load with

<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
 google.charts.load('current', {packages: ['corechart']});
 google.charts.setOnLoadCallback(drawChart);

However, I have an error:

Blocked a frame with origin from accessing a cross-origin frame

My Google Map script worked perfectly well, then I have decided to add a chart to it.

I have XAMPP installed and am testing my code on localhost.

My questions are:

  1. Is it possible to load libraries in this way, or do I have to change my 'map' part to the 'visualization' library?
  2. Does the above error come from loading APIs from different places?
  3. How do I combine the sophistication of Google Maps API and Geometry with charts?
joe_young
  • 3,888
  • 2
  • 22
  • 35
Frank
  • 41
  • 1
  • 1
  • 5
  • I noticed that your maps script has jskey, which is incorrect. this should be ``. – LexJulienne Dec 28 '15 at 14:22
  • Possible similar issue of [http://stackoverflow.com/questions/25098021](http://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame?rq=1). Please read through [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) for details about changing origins and Cross-origin network access – LexJulienne Dec 28 '15 at 14:31
  • @LexJulienne: as with regards _jskey_, it was just a typo in my post, thanks for pointing it out. – Frank Dec 28 '15 at 15:27

0 Answers0