Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding the new google map in your website

I just found out that the new google map doesn't have a link button that used to let people get the embed code which they can embed in their websites.

LINK-1 LINK-2 (both links say 'click on "link" option to get the embed code')

Also, They seem to have changed the url format,(a lot cleaner now!) Now it looks like:

https://www.google.com/maps/preview?ie=UTF8#!data=!1m4!1m3!1d2020!2d74.995161!3d13.2164639

where the !data parameter holds all the information(lat,long,zoom,screen span etc.,)

!data=!1m4!1m3!1d2020!2d74.995161!3d13.2164639

So I tried constructing the map's embed parameters manually(assuming that !2d74.995161 and !3d13.2164639 represent lat and long)

<iframe class="map" width="924" height="208" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;t=m&amp;ll=74.995161,13.2164639&amp;spn=0.003381,0.017231&amp;z=16&amp;output=embed"></iframe>

But to my surprise the above embed code is pointing to an entirely different location(Greenland Sea! where as my original link is of IND).

My QUESTION: How to get the embed code in google's new map.

like image 964
Nagendra Rao Avatar asked Jun 15 '13 15:06

Nagendra Rao


People also ask

How do you embed a Google Map into a website?

Embed a map or directionsClick Share or embed map. Click Embed map. Copy the text in the box. Paste it into the HTML of your website or blog.

Does embedding Google Maps Help SEO?

Embedding Google Maps not only helps local SEO but is also straightforward and user-friendly. It directs clients to a page with just a click, showing them your business address, street view, reviews, and more. It is even easy for business owners to embed Google Maps on their business page!


2 Answers

You have the latitude and longitude reversed:

Try this,

https://maps.google.com/?ie=UTF8&t=m&ll=13.2164639,74.995161&spn=0.003381,0.017231&z=16&output=embed

code snippet:

<iframe class="map" width="924" height="208" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/?ie=UTF8&t=m&ll=13.2164639,74.995161&spn=0.003381,0.017231&z=16&output=embed"></iframe>
like image 99
geocodezip Avatar answered Oct 15 '22 16:10

geocodezip


On the new Google maps they added a "Share and embed map" option.

It's hidden in the little gear icon down on the right side of the map.

Or you can manually build it...but this is easier and it will also link to a company's Google listing.

like image 26
kevlar Avatar answered Oct 15 '22 16:10

kevlar