question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Anchor is Infowindow error.

See original GitHub issue

Issue template

If you want to ask question, ask it in Spectrum.chat or Slack channel

Please do not post unformatted code into issues, and please do not ask questions. Only real issues, PR or feature requests allowed. Minimal reproduction in codesandbox.io is must have.

Please provide an explanation

Your Environment

os: windows

node --version: 12+

react version: 16.8

webpack version: last

@babel version: last

@react-google-maps/api version

How is it behave?

How should it behave correctly?

basic implementation of incorrect behavior in codesandbox.com

hi, how should i fill in the anchor property?

My code:

<InfoWindow
              position={{
                lat: positionSelectedDoctors?.position.lat as number,
                lng: positionSelectedDoctors?.position.lng as number,
              }}
              onCloseClick={() => setOpenWindow(!openWindow)}
              anchor={new google.maps.Point(10, 10)}
            >
              <MarkerDetails>
                <img src={positionSelectedDoctors?.avatar_url} alt="foto" />
                <span>{positionSelectedDoctors?.genre}</span>
                <span>{positionSelectedDoctors?.name}</span>
                <span>
                  {positionSelectedDoctors?.city} -{' '}
                  {positionSelectedDoctors?.uf}
                </span>
              </MarkerDetails>
            </InfoWindow>

Error: point

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
maxleon52commented, Oct 23, 2020

@JustFly1984 the solution was to remove the anchor and pass options = {{pixelOffset: new google.maps.Size (0, -30)}}

0reactions
JustFly1984commented, Oct 26, 2020

@maxleon52 thank you for solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Map Angular9 error with opening info window ...
Here is another pic of debug console, inside google-maps.js file, trying to call the getAnchor() with no luck becasue it doesn't exist. enter ......
Read more >
Anchor should not be required in InfoWindow #94 - GitHub
The anchor property is the required property for InfoWindow now. My working infowindows code ... The code doesn't use 'anchor' and no error....
Read more >
map.infoWindow.ANCHOR_UPPERRIGHT causing object er...
The map.infoWindow.setFixedAnchor is causing an object error in the addIdentifyResultsToMap function??? ... I want to set the position that the ...
Read more >
Info Windows | Maps JavaScript API - Google Developers
An InfoWindow displays content (usually text or images) in a popup window above ... If the anchor option is null or undefined, the...
Read more >
InfoWindow | API Reference | ArcGIS API for JavaScript 3.42
Methods ; setContent(content), InfoWindow, Sets the content in the InfoWindow. ; setFixedAnchor(anchor), None, Sets the fixed location of the InfoWindow anchor.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found