@maplayr/react-native
    Preparing search index...

    Function CoordinateAnnotationLayer

    • A layer of annotations, each a React Native view placed at an item's coordinates. Multiple annotation layers can be added to a MapView if needed.

      Type Parameters

      • T

      Parameters

      Returns Element

      <MapView map={mapLoadResult.map}>
      <CoordinateAnnotationLayer
      data={rides}
      keyExtractor={ride => ride.id}
      coordinates={ride => ride.coordinates}
      anchor={{ x: '50%', y: '100%' }}
      selectedKeys={selectedIds}
      onSelect={ride => setSelectedIds([ride.id])}
      onDeselect={ride => setSelectedIds(ids => ids.filter(id => id !== ride.id))}
      renderAnnotation={({ item, isSelected }) =>
      <RideAnnotation ride={item} selected={isSelected} />
      }
      />
      </MapView>