---
name: "Tirex::Map"
section: "3pm"
platform: "linux"
package: "tirex"
version: "0.7.1-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tirex::Map"
---

# Tirex::Map(3pm)

A Tirex map configuration

## NAME

Tirex::Map - A Tirex map configuration

## SYNOPSIS

my `$map` = Tirex::Map-\>**new()**;

## DESCRIPTION

A Tirex map configuration. It always contains the name, tile directory and zoom range for this map. Depending on the backend there can be more options.

## METHODS

### Tirex::Map-\>get('foo')

Get map by name.

### Tirex::Map-\>clear();

Clear list of maps.

### Tirex::Map-\>get\_map\_for\_metatile($metatile)

Get map for a metatile.

Will croak if the map named in the metatile does not exist. Will also croak if the zoom given in the metatile is out of range.

### Tirex::Map-\>new( ... )

Create new map configuration.

Default values for minimum zoom (minz) is 0, for maximum zoom (maxz) it's 17.

### Tirex::Map-\>new\_from\_configfile($filename, $renderer)

Create new map config from a file for a given renderer.

Croaks if the file does not exist.

### $map-\>get\_name()

Get name of this map.

### $map-\>get\_renderer()

Get renderer of this map.

### $map-\>get\_filename()

Get filename of config file for this map. This only works if the map was created from a config file. Otherwise it will return undef.

### $map-\>get\_tiledir()

Get tile directory of this map.

### $map-\>get\_minz()

Get minimum zoom value of this map.

### $map-\>get\_maxz()

Get maximum zoom of this map.

### $map-\>to\_s();

Return human readable description of this map.

### $map-\>to\_hash();

Return parameters of this map as hash.

### Tirex::Map-\>status();

Return status of all configured maps.
