Does the AdvancedMarker support something similar to the anchorPoint on the legacy Marker component? #273
-
There are use cases where I want my AdvancedMarker to be rendered anchored to the bottom or center of the point. Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can put any component or html-element inside the |
Beta Was this translation helpful? Give feedback.
You can put any component or html-element inside the
AdvancedMarker
component, and those elements will be rendered such that the top-left corner of the element ends up at the geographic location of the marker. From there you can use regular CSS to reposition the element as needed (e.g.tranform: translate(-50%, -50%)
to move the anchor-point to the center of the element).