Google Maps inside iframe not loading

后端 未结 3 1173
庸人自扰
庸人自扰 2020-12-15 17:33

I ran into a strange issue, and I don\'t know what the problem is. The following jQuery code is a simplified version of what I want to achieve:

var iframe =          


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 18:18

    As of 2014, the option &output=embed does not work anymore. Google suggests you to switch to Google Maps Embed API. Here is a Quick Start.

    Basically, the new iframe link is:

    https://www.google.com/maps/embed/v1/place?key={BROWSER_KEY}&q={YOUR_ADDRESS_ENCODED}
    

    Remember to enable Google Maps Embed API in API Console.

    p.s. checked working at the moment I write this answer

提交回复
热议问题