After creating a custom public map on google.maps, I noticed that the embedded version on my site is zoomed out too far and not centered on my location like the original. You can view it here.
Here's the code I'm using to embed the map:
<iframe id="mapframe" src="https://www.google.com/maps/d/embed?mid=zDPZ70Xno_3g.k5EUl8d_poK0" width="700" height="400" frameborder="0" style="border:0"></iframe>
In addition, I've observed that in Chrome, the map sometimes zooms in properly after page refreshes, but not in Safari or Firefox. You can see it live on my site D&P profimedia by following specific steps.
Despite trying various solutions, I haven't been able to fix this issue. The map is hidden in an overlay until the user clicks on the info button - could this be causing the problem with zooming?
I would greatly appreciate any tips or suggestions you may have.
UPDATE 3
Attempting to use embed
tags instead of iframe
resolved the zooming issue in Safari and Chrome, but now Firefox displays a grey box with a "missing plugin" message. I tried nesting the embed
within an object
tag as recommended, but it caused additional problems.
<object class="mapframe" type="text/html" data="https://www.google.com/maps/d/embed?mid=zDPZ70Xno_3g.k5EUl8d_poK0" height="400" width="700" frameborder="0" style="border:0;">
<embed class="mapframe" src="https://www.google.com/maps/d/embed?mid=zDPZ70Xno_3g.k5EUl8d_poK0" height="400" width="700" frameborder="0" style="border:0;">
</object>
Unfortunately, I'm still facing issues in different browsers and struggling to understand why...