Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google map infowindow position on right side

How I can show InfoWindow with arrow on the left side like instead on bottom?

screenshot example here

like image 620
Misha Kav Avatar asked Jul 03 '16 06:07

Misha Kav


People also ask

How do you change the infowindow position on Google Maps?

An InfoWindow can be placed on a map at a particular position or above a marker, depending on what is specified in the options. Unless auto-pan is disabled, an InfoWindow will pan the map to make itself visible when it is opened. After constructing an InfoWindow, you must call open to display it on the map.

How do I change the infowindow on Google Maps Android?

The simplest way to add an info window is to set the title() and snippet() methods of the corresponding marker. Setting these properties will cause an info window to appear whenever that marker is clicked.

What is infowindow in Google map?

An InfoWindow displays content (usually text or images) in a popup window above the map, at a given location. The info window has a content area and a tapered stem. The tip of the stem is attached to a specified location on the map. Info windows appear as a Dialog to screen readers.


1 Answers

It been a while now, and probably you do move your interest on this topic. But i would to say that it is possible without using any third party tools... just add pixelOffset to the infowindow like this:

var infowindow = new google.maps.InfoWindow({
      content: "My custom info window",
      pixelOffset: new google.maps.Size(250, 150)
  });

Also, you may would to rotate the arrow as well, just add those style lines:

#map div div div:last-child div:last-child div div div:nth-child(3) {
  left: 0 !important;
  top: 30px !important;
  border-top-width: 24px;
  position: absolute;
  transform: rotate(90deg);
}

May it help you or help someone else...

cheers.

like image 141
Malek Boubakri Avatar answered Sep 28 '22 07:09

Malek Boubakri