简体   繁体   中英

Will this specific method of dynamically embedding Google Maps without API key work for 1000s of page views?

With the 2018 changes in Google Maps pricing, we can't afford to use it as we have done so far. We're considering moving to another provider, but also discovered a working way to embed a map without providing an API key:

<div style="width: 100%">
  <iframe width="100%" height="600" 
    src="https://maps.google.com/maps?output=embed&amp;width=100%&amp;height=600&amp;hl=en&amp;q=1600%20Pennsylvania%20Ave%20NW%2C%20Washington%2C%20DC%2020006%2C%20USA+(Example%20Address)&amp;ie=UTF8&amp;t=&amp;z=16&amp;iwloc=B"
    frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
</div>

Notes:

  • We have thousands of page views, daily, for different addresses.
  • We couldn't find this way of displaying a map documented by Google.
  • Other ways to load a map in an iframe didn't seem to work without an API key. (Exception: URLs generated by clicking 'Share' on Google Maps, of the form <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!...other params that only Google knows how to generate here...></iframe> - obviously we can't do this by hand.)

Our questions:

  • Why did Google leave this method of freely embedding dynamic Google Maps without an API key?
  • Is there a request limit (eg 100 per day) to this?
  • Is there some documentation somewhere on this?

The iframe in your example was generated using the consumer application on maps.google.com. Please note that web site maps.google.com is not related to Google Maps APIs. These are different products managed by different teams at Google.

As you generated an iframe on maps.google.com and it doesn't use API you don't need any API key.

This feature of the Google Maps web site is documented on

https://support.google.com/maps/answer/144361

As far as I know there is no daily limit for these kind of iframes.

I hope this helps!

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