K
K
kentos2018-09-18 20:34:52
JavaScript
kentos, 2018-09-18 20:34:52

How to group labels?

how to group markers on the map? I am using react-google-maps
map code

const Map = compose(withScriptjs, withGoogleMap)((props) =>
  <GoogleMap
    defaultZoom={14}
    center={props.center}
  >
    {props.places.map(row => {
      return (
        <MarkerElement
          row={ row }
          placeToShow={ props.placeToShow }
          isOpen={ props.isOpen }
          onToggleOpen={ (placeToShow, isOpen) => props.onToggleOpen(placeToShow, isOpen) }
          places={ props.places }
          key={ row.id }
        />
      )
    })}
  </GoogleMap>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-09-18
@kentos

MarkerClusterer is here to help.
UPD. https://codesandbox.io/s/for-httpsqnahabrcomq56380...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question