Skip to content

Conversation

@mrMetalWood
Copy link
Collaborator

@mrMetalWood mrMetalWood commented Jan 15, 2026

Summary

This PR adds React components for Google Maps 3D API support, enabling developers to create 3D map experiences.

Key Components

  • <Map3D> - Main 3D map component with controlled/uncontrolled camera props
  • <Marker3D> - 3D markers with altitude support
  • <Popover3D> - Popovers/Infowindows positioned in 3D space

Key Features

  • Camera Control - Props for center, range, heading, tilt, roll (controlled via props or defaultX variants)
  • Camera Animations - Imperative flyCameraAround(), flyCameraTo(), and stopCameraAnimation() via ref
  • Events - onCameraChanged, onClick, onSteadyChange callbacks
  • Hook - useMap3D(id?) to access Map3D instances from child components

mrMetalWood and others added 22 commits October 7, 2025 16:41
Adds support for the 'anchorLeft' and 'anchorTop' properties on the AdvancedMarker component. This provides a more direct way to control the anchor point of the marker, especially with modern versions of the Google Maps JavaScript API.

The implementation includes:
- A new internal 'useAdvancedMarkerAnchorPoint' hook to encapsulate anchoring logic.
- Version detection to use native 'anchorLeft'/'anchorTop' properties on Google Maps API v3.62+ and fallback to a CSS transform on older versions.
- A warning is logged when using the new props on unsupported API versions.
- Added TypeScript definitions of anchor options to type augmentation
- Added API documentation.
Adds a suite of tests for the anchor-related props ('anchorLeft', 'anchorTop', and 'anchorPoint') on the AdvancedMarker component.

This suite covers:
- Precedence of 'anchorLeft'/'anchorTop' over 'anchorPoint' on modern APIs.
- Correct fallback to 'anchorPoint' on modern APIs.
- Correct application of 'anchorPoint' via CSS transform on legacy APIs.
- Warning generation when using modern props on legacy APIs.
- Snapshot testing for console warnings.
Marks the 'anchorPoint' prop as deprecated in favor of the 'anchorLeft' and 'anchorTop' props.

- Adds a '@deprecated' JSDoc tag to the 'anchorPoint' prop.
- Adds a TODO comment to add a console warning in a future version.
@mrMetalWood mrMetalWood changed the title Feat/3d map components feat: add 3D map, marker and popover components Jan 15, 2026
I created a new key, this one doesnt exist anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants