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

Clustering for <OverlayView> or any alternatives to make Clustering for custom markers as it works for native <Marker>

Open snazarov-spacequant opened this issue 2 years ago • 2 comments

Please provide an explanation of the issue

Clustering not working for custom marker wrapped with <OverlayView> component as it works for native <Marker>. Main problem is binding Clustering with custom marker, for example: native marker get props clusterer for this from <MarkerClusterer>

Example of <OverlayView> usage:

<MarkerClusterer>
  <OverlayView mapPaneName={layer} position={{ lng, lat }}>
      <div className={styles.marker} onClick={handleClick} onMouseLeave={onMouseLeave} onMouseOver={onMouseEnter}>
          {isDetailed ? (
              <MarkerDetailed blurred={blurred} propType={propType} transaction={transaction} />
          ) : (
              <MarkerShort blurred={blurred} price={price} type={propType} />
          )}
      </div>
  </OverlayView>
</MarkerClusterer>

@react-google-maps/api version @react-google-maps/api": "^2.18.1

How does it behave?

No way to bind <OverlayView> with <MarkerClusterer>

How should it behave correctly?

Should be way to bind <OverlayView> with <MarkerClusterer> or alternatives

snazarov-spacequant avatar Jun 12 '23 10:06 snazarov-spacequant

Did you manage to make any progress on this? Just looking to implement custom markers but I need to be able to cluster

mattvb91 avatar Jul 27 '23 09:07 mattvb91

Did Anyone find a way to deal with custom markers AND clusturer? Tried to find an alternative but without success :/

jkergal avatar Apr 25 '24 13:04 jkergal