# CCTiledMapTilesetInfo Class Reference

Inherits from | NSObject
Declared in | CCTMXXMLParser.h

## Overview

CCTiledMapTilesetInfo contains information about the Tile Map’s Tileset. This information is obtained from the supplied Tile Map File (TMX).

## Tasks

### Accessing the Tile Map Tileset Info Attributes

- `name` property
- `firstGid` property
- `tileSize` property
- `spacing` property
- `margin` property
- `sourceImage` property
- `imageSize` property
- `tileOffset` property
- `tileAnchorPoint` property
- `contentScale` property

### Accessing the Tile Map Tileset Info Helpers

- `– rectForGID:`

## Properties

### contentScale

Content scale of the TMX file. Mostly for backwords compatibility.

`@property (nonatomic, readwrite) CGFloat contentScale`

#### Declared In

`CCTMXXMLParser.h`

### firstGid

First GID.

`@property (nonatomic, readwrite, assign) unsigned int firstGid`

#### Declared In

`CCTMXXMLParser.h`

### imageSize

Size of image in pixels.

`@property (nonatomic, readwrite, assign) CGSize imageSize`

#### Declared In

`CCTMXXMLParser.h`

### margin

Tileset margin.

`@property (nonatomic, readwrite, assign) unsigned int margin`

#### Declared In

`CCTMXXMLParser.h`

### name

Tileset name.

`@property (nonatomic, readwrite, strong) NSString *name`

#### Declared In

`CCTMXXMLParser.h`

### sourceImage

Tileset source texture, should be spritesheet.

`@property (nonatomic, readwrite, strong) NSString *sourceImage`

#### Declared In

`CCTMXXMLParser.h`

### spacing

Tileset spacing.

`@property (nonatomic, readwrite, assign) unsigned int spacing`

#### Declared In

`CCTMXXMLParser.h`

### tileAnchorPoint

Auto set when tileOffset is modified.

`@property (nonatomic, readonly, assign) CGPoint tileAnchorPoint`

#### Declared In

`CCTMXXMLParser.h`

### tileOffset

Tileset offset in pixels.

`@property (nonatomic, readwrite, assign) CGPoint tileOffset`

#### Declared In

`CCTMXXMLParser.h`

### tileSize

Tileset size.

`@property (nonatomic, readwrite, assign) CGSize tileSize`

#### Declared In

`CCTMXXMLParser.h`

## Instance Methods

### rectForGID:

Return rectange for GID value.

`- (CGRect)rectForGID:(unsigned int)gid`

#### Parameters

gid

  GID value to use.

#### Return Value

CGRect.

#### Declared In

`CCTMXXMLParser.h`