Unsafe JavaScript attempt to access frame with google maps

10,638

Solution 1

For reference, it would seems to be a bug in Google Chrome: http://code.google.com/p/chromium/issues/detail?id=43173

Ben Lee's workaround seems to be the only workaround as long as it doesn't get fixed in Google Chrome.

Solution 2

It's a bug in Chrome. To get rid of it, use the following code:

<div id="map_canvas"></div>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">

var centerNL = new google.maps.LatLng(52.093008,5.12);
var myOptions = {
  zoom: 11,
  center: centerNL,
  mapTypeId: google.maps.MapTypeId.ROADMAP,
  mapTypeControl: false,
  navigationControl: true,
  navigationControlOptions: {
    style: google.maps.NavigationControlStyle.ZOOM_PAN,
    position: google.maps.ControlPosition.TOP_RIGHT
  }
};

map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);
</script>

Replace LatLng and zoom with your own values.

Share:
10,638

Related videos on Youtube

Rafael Sedrakyan
Author by

Rafael Sedrakyan

Updated on June 26, 2022

Comments