Anchor is Infowindow error.
See original GitHub issueIssue 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:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JustFly1984 the solution was to remove the anchor and pass options = {{pixelOffset: new google.maps.Size (0, -30)}}
@maxleon52 thank you for solution