Replies: 3 comments 1 reply
-
I'd also like to know. Currently my custom markers use OverlayView. While this does work, it doesn't allow me to move/drag them. |
Beta Was this translation helpful? Give feedback.
-
I understand this library is trying to keep as close to the native API as possible. The best workaround I have comeup with is to convert an SVG to base64 and use that as a |
Beta Was this translation helpful? Give feedback.
-
Also facing the same question. Easily doable in old library. Suppose I'll use the workaround suggested above for now. Perhaps this is an opportunity to contribute! |
Beta Was this translation helpful? Give feedback.
-
We are converting from
google-map-react
toreact-google-maps-api
which means more of a native Google Maps API experience.Prior to the change, we were able to load a custom Marker as a React Component like:
From their docs of our original lib
google-map-react
, it says:While that is great, it proves this library moves away from the native API...
However, with the new Marker API from react-google-maps-api, React Components are not possible. They only expect
string | google.maps.Icon | google.maps.Symbol;
types, such as:or
I thought I could create a true custom-marker like:
but no such luck.
What would be a good solution for this?
Beta Was this translation helpful? Give feedback.
All reactions