react-google-maps-api icon indicating copy to clipboard operation
react-google-maps-api copied to clipboard

I need to custom MarkerClusterer by JSX

Open lequangnamsoraly2009 opened this issue 2 years ago • 1 comments

Please do not post unformatted code into issues, and please do not ask questions. Only real issues, PR's or feature requests are allowed. Minimal reproduction in codesandbox.io is required.

Please provide an explanation of the issue

Is there a way to replace the MarkerClusterer icon with a JSX?

Your Environment

os: mac

node v14.21.2

react 18.2.0

webpack version

@babel version

@react-google-maps/api ^2.18.1

How does it behave?

How should it behave correctly?

Basic implementation of incorrect behavior in codesandbox.com

lequangnamsoraly2009 avatar Jun 23 '23 04:06 lequangnamsoraly2009

You can disable the default icon and style it with CSS minimally.

<MarkerClusterer averageCenter enableRetinaIcons clusterClass={styles.cluster} options={{ gridSize: 80, styles: [{ url: transparent, height: 30, width: 30, }] }}>

You have to give it an url, so I downloaded a transparent image, and you can change the background color and shape with css.

Taloqq avatar Jun 30 '23 10:06 Taloqq