Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove box from new Google Maps embeds?

Tags:

google-maps

Google appear to have changed how their iFrames work. There is now an infobox at the top left that tries to display the place name. The problem is that here in Ireland it's often impossible to use the name of the business to pinpoint a map, and often you need to use the street name etc etc, which makes the box functionaly useless as the name of the street is right there on the map, as well as on the page beside the map!

How can I get rid of this thing? In this example the business is in the same building as Irish Coaches. Maps insists that by putting in the address, this solicitor for some reason want's to inform its prospective clients of where Irish Coaches is!

enter image description here

I've tried iwloc but it does nothing, and I can't effect it via CSS and jQuery because it's on another domain!

Any ideas?

like image 802
Ferdia O'Brien Avatar asked Mar 21 '14 09:03

Ferdia O'Brien


People also ask

How do I embed a Google Maps map on my site?

The Google Maps Embed API requires an API key. Please register for an API key, at no charge, to embed a map on your site. Need an API key? Complete the registration process via the Google API Console. When you've got your key, copy it into the textbox below.

How much does the Google Maps embed API cost?

Note: The Maps Embed API is available at no charge, and you can use the API without having a billing account. Google Cloud offers a $0.00 charge trial. The trial expires at either end of 90 days or after the account has accrued $300 worth of charges, whichever comes first.

How do I get an API key to embed a map?

The Google Maps Embed API requires an API key. Please register for an API key, at no charge, to embed a map on your site. Need an API key? Complete the registration process via the Google API Console.

Does the maps embed API support + and%20 escape codes?

The Maps Embed API supports both + and %20 when escaping spaces. For example, convert "City Hall, New York, NY" to City+Hall,New+York,NY, or plus codes "849VCWC8+R9" to 849VCWC8%2BR9.


Video Answer


2 Answers

It works when you use coordinates instead of the business name, as of 1/22/2018

  1. Go to Maps Ie to get your Coordinates
  2. Go to Google Maps and enter those coordinates (comma separated like this: 33.319663, -111.89780100000002)
  3. Click on Share (located on the left)
  4. Click on Embed Map
  5. Configure the size of map that you want
  6. Copy the html

Resulting html is something like this:

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3333.967410377096!2d-111.89998968453055!3d33.31966746342457!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMzPCsDE5JzEwLjgiTiAxMTHCsDUzJzUyLjEiVw!5e0!3m2!1sen!2sus!4v1516690469899" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

Size configuration screen

like image 69
zeta Avatar answered Oct 16 '22 11:10

zeta


This stopped working around February 2017. They must've updated their API. :(

PLEASE USE ZETA'S EXAMPLE FROM 1/22/2018

This is how you do it!

Working version

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2381.7399040776495!2d-6.261147484122739!3d53.34791197997939!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!3m2!1sen!2sus!4v1462581622087" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

I noticed a pattern in another site's embed that only had the "View larger map" text and none of the extra stuff. Just a few characters had to be removed.

Full embed you are given

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2381.7399040776495!2d-6.261147484122739!3d53.34791197997939!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48670e84fbdd6bd3%3A0x998692b4f1b691e1!2sUlster+Bank+Chambers%2C+O&#39;Connell+Street+Lower%2C+Dublin+1%2C+Ireland!5e0!3m2!1sen!2sus!4v1462581622087" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

This is the part that's removed

1m2!1s0x48670e84fbdd6bd3%3A0x998692b4f1b691e1!2sUlster+Bank+Chambers%2C+O&#39;Connell+Street+Lower%2C+Dublin+1%2C+Ireland!5e0!

I've tried it for other addresses as well.

like image 26
rawnewdlz Avatar answered Oct 16 '22 11:10

rawnewdlz