Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed params in new Google Maps

Tags:

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?

like image 638
individual8 Avatar asked Nov 28 '13 13:11

individual8


People also ask

How do I embed a pin in Google Maps?

You can now pinpoint locations manually by clicking the marker icon and placing it directly onto the map, or search for locations using the search box at the top of the screen. If you're adding locations manually, you can name the location and save to add it to the map.

Can I iFrame Google Maps?

All you need to do is insert a name for the map, add in your address and then “Copy iFrame HTML code”. Using the various map functions you can also modify the appearance of the map to your preferences.


1 Answers

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

like image 168
Junho Ryu Avatar answered Sep 28 '22 16:09

Junho Ryu