3

Below is my google maps code which embeds a google map iframe into my website. However I need to know which part of the code gets rid of the description bubble as it is in the way and looks awful.

<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.uk/maps/embed/v1/vie?f=q&amp;source=s_q&amp;hl=en&amp;geocode=Fef8HgMdTF8HACGtndVv4fvEAykHADl3VT_YRzGtndVv4fvEAw%3BFf-gHwMdtnoIACG4YnecgIb83ykH1S7ttDnYRzG4YnecgIb83w&amp;q=mildenhall+to+raf+lakenheath&amp;aq=&amp;sll=52.387544,0.494041&amp;sspn=0.099739,0.244446&amp;ie=UTF8&amp;ll=52.378862,0.524008&amp;spn=0.035347,0.068778&amp;t=m&amp;saddr=mildenhall&amp;daddr=raf+lakenheath&amp;output=embed/v1/view"></iframe>

'&iwloc=near' no longer works with the new google api.

Thanks in advance

user3548920
  • 31
  • 1
  • 1
  • 3
  • I have been looking for the same thing and unless there is an undocumented method, unfortunately it looks like this is currently not possible: https://developers.google.com/maps/documentation/embed/guide#optional_parameters – Tim Jul 27 '14 at 02:27

3 Answers3

1

This answer :

Google Maps Embed - Remove Place Card

has a method of using a container div with overflow:hidden and a negative margin on the iframe to chop off the top containing the description bubble.

Community
  • 1
  • 1
Nat
  • 621
  • 1
  • 6
  • 17
0

Just Add :

&iwloc=near  in iframe src 

Used like this:

<iframe width="400" scrolling="no" height="300" frameborder="0" src="https://maps.google.co.uk/maps?hl=en&q=so21+1aj&z=10&output=embed&iwloc=near" marginwidth="0" marginheight="0"></iframe>
Nayeem Mansoori
  • 821
  • 1
  • 15
  • 41
-1

Using jQuery I removed the bubble, from actual version of / place autocomplete version / google maps, modyfing one original function:

autocomplete.addListener('place_changed', function() {

// ... the function code, before it's closing

// tag I added 3 lines: //

      $("div[class='gm-style-iw']").prev('div').remove(); // bubble
      $("div[class='gm-style-iw']").next('div').remove();  // close button
      $("div[class='gm-style-iw']").remove(); // text

});

it is also necessary to attach the jQuery library

P. Alex
  • 1
  • 1