Google-map-react: Makers show wrong position even set {top, left} when zoom out!?

Created on 23 Nov 2017  路  4Comments  路  Source: google-map-react/google-map-react

Dear all,
The marker I'm using css class like this
{
width: 50px;
height: 50px;
top: -25px;
left:-25px;
}
It show perfect if the map zoom in, but when I zoom out they seem go wrong way ?!
How do I deal with it?

Most helpful comment

In my case, the issue had been fixed by adding the fallowing style to the marker:

transform: translateY(-50%);

All 4 comments

I have the same problem using slightly different styling:

.marker {
  position: absolute;
  width: 50px;
  height: 50px;
  top: -25px;
  left:-25px;
}

Anything I'm missing? The code above is taken from API.md

In my case, the issue had been fixed by adding the fallowing style to the marker:

transform: translateY(-50%);

@ArmanMazdaee is right, the correct approach would use to use transform.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Pau1fitz picture Pau1fitz  路  4Comments

zander312 picture zander312  路  3Comments

robertwt7 picture robertwt7  路  4Comments

SachaG picture SachaG  路  4Comments

nhducit picture nhducit  路  5Comments