简体   繁体   中英

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.

在此输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM