<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/ItemCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "cl/mapkit.ItemCollection"
  },
  "title" : "ItemCollection"
}
-->

# ItemCollection

A tree structure containing annotations, overlays, and nested item collection objects.

```
class ItemCollection<D = any>
```

## Overview

The [`importGeoJSON(data, callback)`](/documentation/MapKitJS/mapkit/importGeoJSON) method returns item collections. Don’t instantiate them directly.

## Topics

### Item collection properties

[`get data(): D | null;
set data(data: D | null);`](/documentation/MapKitJS/ItemCollection/data)

The raw GeoJSON data.

[`getFlattenedItemList(): (Annotation | Overlay)[];`](/documentation/MapKitJS/ItemCollection/getFlattenedItemList)

A flattened array of items that includes annotations and overlays.

[`get items(): Item[];
set items(items: Item | Item[] | null);`](/documentation/MapKitJS/ItemCollection/items)

A nested list of annotations, overlays, and other item collections.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)