ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

GoogleMaps iPad & iPhone solution

March 09, 2011 6:30am

Subscribe [1]
  • #1 / Mar 09, 2011 6:30am

    Problem
    Googlemaps Iframe not working on the iPad & IPhone

    Solution
    The Googlemaps will work on iPhone if you remove output=embed within your iFrame src.
    If you do so it will create a new problem and will not work correctly within your pc/mac browser. Therefore you will have to detect if the user is on a mobile device. This you can do with the MX Mobile Device Detect Plugin.
    mx-mobile-device-detect devot-ee

    I’m not saying it works at all times, but it works for me!


    Working Example

    {exp:mobile_detect}
        {if mobile}
            <iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=nl&geocode;=&q=pixeldeluxe&aq;=&sll=37.0625,-95.677068&sspn=51.754532,114.169922&ie=UTF8&hq=pixeldeluxe&hnear;=&radius=15000&cid=13926122548448187024&ll=51.916532,4.465427&spn=0.031765,0.051498&z=13&iwloc=A&"></iframe>
        {/if}
        {if not_mobile}
            <iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=nl&geocode;=&q=pixeldeluxe&aq;=&sll=37.0625,-95.677068&sspn=51.754532,114.169922&ie=UTF8&hq=pixeldeluxe&hnear;=&radius=15000&cid=13926122548448187024&ll=51.916532,4.465427&spn=0.031765,0.051498&z=13&iwloc=A&output=embed"></iframe>
        {/if}
    {/exp:mobile_detect}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases