1.0.0 • Published 2 years ago

@amsterdam/arm-cluster v1.0.0

Weekly downloads
158
License
MPL-2.0
Repository
github
Last release
2 years ago

ARM Cluster

Part of Amsterdam React Maps library.

This is the link to the story book demo site with examples

Installation

Add this package to your project by running:

npm install --save @amsterdam/arm-cluster

Usage

import 'leaflet/dist/leaflet.css' // make sure this is always included!
import { Map, BaseLayer, ViewerContainer, Zoom } from '@amsterdam/arm-core'
import { MarkerClusterGroup, createClusterMarkers } from '@amsterdam/arm-cluster'

const markers = []

const MyComponent = () => (
  <Map fullScreen>
    <MarkerClusterGroup markers={createClusterMarkers({
          markers,
          events: {
            click: (e) => {
              window.alert(
                `Marker clicked!, Lat: ${e.latlng.lat}, Lng: ${e.latlng.lng}`,
              )
            },
          },
        })}  
      />
    <ViewerContainer bottomRight={<Zoom />} />
    <BaseLayer />
  </Map>
)

export default MyComponent

Exports component

  • MarkerClusterGroup: props
    • markers
    • optionsOverrides?
    • events?
    • setInstance?

Exports service

  • createClusterMarkers(markers, events)
1.0.0

2 years ago

0.10.0

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.8.1-alpha.1

3 years ago

0.9.0

3 years ago

0.6.1-alpha.71

3 years ago

0.6.1-alpha.70

3 years ago

0.6.1-alpha.53

3 years ago

0.6.1-alpha.29

3 years ago

0.6.1-alpha.28

3 years ago

0.5.2-alpha.105

3 years ago

0.6.1-alpha.8

3 years ago

0.6.1-alpha.19

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.1

3 years ago

0.4.0

4 years ago