Search code examples
google-mapsgoogle-maps-static-api

Static map in OBJECT tag DATA attribute not rendering


This issue does seem to be specific to google chrome:

I currently have this code in web page which renders properly in firefox & explorer but in google chrome is does not render anything.

<object type="text/html" data="http://maps.googleapis.com/maps/api/staticmap?center=13107+Atlantic+Blvd,Jacksonville,FL+32225&zoom=14&size=300x200&markers=color:blue|label:A|13107+Atlantic+Blvd,+Jacksonville,+Duval,+Florida+32225&sensor=false"></object>

However, when I place the URL in the data attribute directly into chrome as a URL is does render properly. W3schools.com says that the tag and its attributes are fully supported by chrome, anybody got any idea if this is a bug or something else I need to add/do to this tag for it to perform properly?


Solution

  • It's not a bug, the server sends a x-frame-options-header with the value SAMEORIGIN, which should prevent the file from being loaded in an external iframe(or even an object).

    Use an <img/> instead.