WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Google maps iframe doesn't work (8 posts)

  1. smara.86
    Member
    Posted 7 months ago #

    Hello,

    I've been trying to link external Google Maps, but for some reason it doesn't work correctly. The pop-up opens as expected, but it doesn't load the map. Can you help me with that (I have the last version of the plugin). I've tried some tips from other threads but they are not fixing my bug. The pop-up used to work 2 months ago. I don't know what happened.

    Thanks a lot

    http://wordpress.org/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 7 months ago #

    Hi smara.86, can you share a link to a page where I can see the issue?

  3. smara.86
    Member
    Posted 7 months ago #

    Hey,

    I've managed to fix my problem. It wasn't from the plugin.

    Thx

  4. Jeff
    Member
    Posted 7 months ago #

    I'm having the same problem - it used to work and now doesn't with Google Maps see http://www.manjunaga.com/calendar/classes/yoga-drop-in-class-all-levels-monday.html for example.

    @smara.86 - how did you solve it?

  5. Jeff
    Member
    Posted 7 months ago #

    It appears that the problem is caused by sites like Google stopping Clickjacking http://javascript.info/tutorial/clickjacking

    Someone produced a workaround https://vaadin.com/old-forum/-/message_boards/view_message/2561930#_19_message_4248300 but that might not be appropriate for FancyBox?

    I disabled the iframe for a Google map as I couldn't find an easy workaround

  6. RavanH
    Member
    Plugin Author

    Posted 7 months ago #

    Hi Jeff, there are several things going on. First, there is an error in the Event Calendar script that completely blocks following jQuery scripts like FancyBox. But then, even if you solved that and made the google map link use class="fancybox-iframe" (instead of "no-iframe") then you will find that the Short URL points to a maps page that is not suited for display in iframe content. You need to use the URL that is used in the maps share/embed iframe code...

  7. Jeff
    Member
    Posted 7 months ago #

    Hi Rolf, I've got it working (even with Event Calendar in place - I guess I found a fix for the jQuery problem in the past) with the URL from Google Maps share/embed iframe code (I had to log out of Google in another browser so that it didn't use the new Google maps - the link works from classic fine). See http://www.manjunaga.com/calendar/classes/yoga-drop-in-class-all-levels-monday.html again :-)

  8. smara.86
    Member
    Posted 6 months ago #

    Hey Jeff,

    I discovered that the server did not allow incoming iframes. Check if you are getting this error: "Refused to display 'https://www.google.com/maps/preview?.....' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."
    If this is the case, a quick fix is to add after the "&output=embed" at the end of the link.
    You can check it here : http://www.rivercitystudio.com/blog/2011/09/google-maps-embedding-x-frame-options-change/

Reply

You must log in to post.

About this Plugin

About this Topic