Open kevinSuttle opened 8 years ago
👍
Any update on this?
I realize that this is nearly 2 years late to the party but you can use the label
prop of the Marker, which can either be a string or a MarkerLabel object. Just assign an object with props in that API to the label
prop of your Marker, like this:
<Marker
position={center}
label={{
text: "Hello World!",
fontFamily: "Arial",
fontSize: "14px",
}}
icon={{
url: imageUrl,
anchor: new google.maps.Point(53,53),
labelOrigin: new google.maps.Point(53,115),
}}
/>
I hope this helps someone!
It shows label outside the marker, can i show label in the marker like https://developers.google.com/maps/documentation/javascript/examples/marker-labels
https://developers.google.com/maps/documentation/javascript/examples/marker-labels https://github.com/fullstackreact/google-maps-react/blob/master/src/components/Marker.js#L85