Embed params in new Google Maps

individual8 picture individual8 · Nov 28, 2013 · Viewed 15.7k times · Source

The embed urls produced by the new version of google maps look like this:

https://www.google.com/maps/embed?pb=!1m5!3m3!1m2!1s0x47b161837e1813b9%3A0x4263df27bd63aa0!2sHamburg%2C+Germany!5e0!3m2!1sen!2s!4v1385644179838

How can I construct such a url programmatically given an address or latitude and longitude?

Answer

Junho Ryu picture Junho Ryu · Nov 4, 2014

I wonder if this is the new version or not: https://developers.google.com/maps/documentation/embed/guide

  1. Address: Add a value following "q=" parameter (The Google Maps Embed API supports both + and %20 when escaping spaces.)

  2. Latitude and longitude: "center=" parameter is for latitude and longitude, but you would also want to set "zoom=" level in order to present in the way how you want it to be displayed to users