Search code examples
google-mapsiframegoogle-maps-api-3

How to embed a Google Map iFrame with a custom name


Currently, I am using the following iFrame

<iframe src="https://www.google.com/maps/embed/v1/place?key=APIKEYHERE&q=-34.753608,149.720462" frameborder="0" style="border:0"></iframe>

Although, when rendered, the name of the location is the longitude and latitude, the the below image.

Is it possible to add in a name as a parameter for it to be displayed at the top left of the iFrame instead of the longitude and latitude? There's the option to use the locations name as the q, although some addresses cannot be found, and longitude and latitude is more accurate.

enter image description here


Solution

  • This appears to be a current limitation of the Embed API. However, this is easy enough with the JavaScript API. It is more work, but is much more flexible and powerful.