7

I'm working on a website for a shop and I'm using the GooleMaps Engine Lite to show his location. It works on IE9 and 10, Safari for Windows, iOS and MacOs and Mozilla Firefox, but it's not working on Chrome. If I use the Javascript Console I can see the following error:

Refused to display 'https://accounts.google.com/ServiceLogin?service=mapsengine&passive=1209600…up=https://mapsengine.google.com/map/embed?mid%3DzehbkDaSW5QM.kyKZHGifzxMc' in a frame because it set 'X-Frame-Options' to 'DENY'.

Could anybody help me?

1

4 Answers 4

3

First time I had the problem it disappeared when I rebooted my computer, but today the problem appeared again. I've read on Google forums that the conflict comes when you are semi-logged with your Google account. If I log out completely my account or log in the map re-starts to work. In Safari you will find the same issue.

A temporary solution is sandbox the map iframe to forbid it to access the cookies.

1
  • I know this is an older post, but your answer is the only one that even comes close to the true problem. Can you elaborate or give a link to how you "sandbox the map iframe to forbid it to access the cookies"?
    – pathfinder
    Dec 22, 2014 at 6:46
2

https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options

The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame> or <iframe>. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.

The counter-question I have to you is why are you implementing that URL in an iframe, when it specifically tells the browser it does not want to be loaded in an iframe?

Did you follow the instructions at https://support.google.com/mapsenginelite/answer/3024935?hl=en when embedding the map?

  • Make sure you have your desired map open and that it is set to be accessible by the Public.
  • Click the folder button.
  • Select Embed on my site.
  • In the box that appears, copy the HTML under 'Embed on the web,' and paste it into the source code of your website or blog.
0

You're linking to the Google Account login page for the maps generator, not to a map. The link is probably not what you want.

To make an embeddable map from Google Maps Engine,

  1. click on the green "Share" button on the top right and set you map to public enter image description here
  2. click on the folder icon on the top left (next to "Add layer") and choose "Embed on my site" enter image description here
1
  • google redirects to that login address behind the scenes, I did just what you describe in your answer and still get the same error as OP
    – pathfinder
    Dec 22, 2014 at 6:42
0

1) in the left bottom corner click on 6 teeth wheel , 'Share and integration of map' 2) In opened dialog press on 'integrate map' 3) you got iframe line with correct src .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.