---
title: "itemForFeatureCollection(itemCollection, geoJSON)"
framework: mapkitjs
role: symbol
role_heading: Interface Method
path: mapkitjs/geojsondelegate/itemforfeaturecollection
---

# itemForFeatureCollection(itemCollection, geoJSON)

Overrides a feature collection.

## Declaration

```data
itemForFeatureCollection?<D extends GeoJSONTypes.FeatureCollection>(
    itemCollection: ItemCollection<D>,
    geoJSON: D,
): ItemCollection<D> | Item[] | null;
```

## Parameters

- `itemCollection`: A collection containing associated annotations and overlays.
- `geoJSON`: The original GeoJSON object for the FeatureCollection. This contains an array of feature types.

## Return Value

Return Value A map item or an array of map items.

## Discussion

Discussion MapKit JS calls this method for every GeoJSON FeatureCollection object. The framework also calls this method after constructing subitems and calling their delegate functions.

## See Also

### Overriding items

- [itemForFeature(item, geoJSON)](mapkitjs/geojsondelegate/itemforfeature.md)
- [itemForLineString(overlay, geoJSON)](mapkitjs/geojsondelegate/itemforlinestring.md)
- [itemForMultiLineString(itemCollection, geoJSON)](mapkitjs/geojsondelegate/itemformultilinestring.md)
- [itemForPoint(coordinate, geoJSON)](mapkitjs/geojsondelegate/itemforpoint.md)
- [itemForMultiPoint(itemCollection, geoJSON)](mapkitjs/geojsondelegate/itemformultipoint.md)
- [itemForPolygon(overlay, geoJSON)](mapkitjs/geojsondelegate/itemforpolygon.md)
- [itemForMultiPolygon(itemCollection, geoJSON)](mapkitjs/geojsondelegate/itemformultipolygon.md)
- [styleForOverlay(overlay, geoJSON)](mapkitjs/geojsondelegate/styleforoverlay.md)
