Google Maps and iframe

Classified in : WebMaster - Tags : google maps

Google Maps manages the way it gets displayed and can (depending on cases) deny access with the eror message: Load denied by X-Frame-Options !
Here's how to solve this problem !

What's going on ?

To avoid web site hacking (Cross Site Request Forgery - CSRF) that consists in displaying an authentic web site and display fake information and links on top of it, an option has been added to IE8 (by Microsoft) - then to the other browsers too- to prevent displaying a page in iframe.

So, a standard Google Maps page won't display in a iframe which is the usual way to display a Google Map on your web site.

The Solution

It's simple but when you have to know it. When you look at the Google Maps page, click on the dented wheel on lower right corner and choose the first option in the displayed menu "Share and integrate the map".

Then chose the tab "Integrate the map" (on top of the displayed window, by default it's "Share the link"), and Google will display the code to use for the iframe including the correct URL to use.

 

That's it, your Google Maps integrated in your web sites are displayed again !  wink

[ no comments ]

© Le Computing Froggy  !

Write a comment

What is the fifth letter of the word tac5ex? :