Tirex::Map(3pm)
π Tirex::Map π
okay bestie, so this is the page for Tirex::Map β that's the module living in section 3pm of the User Contributed Perl Documentation, aka the perl docs that actual humans wrote. Sit down, get comfy, we're learning map configs πΊοΈβ¨
β¨ NAME β¨
Tirex::Map β it's giving "a Tirex map configuration", because that's literally what it is π
πΈ SYNOPSIS πΈ
my $map = Tirex::Map->new();
that's it. that's the whole vibe check. you make a map, you're in business π
π¦ DESCRIPTION π¦
So a Tirex::Map is a map configuration, no cap. Every single one of them always has these three things locked in:
- the name π
- the tile directory π
- the zoom range π
...and depending on which backend you're rolling with, there can be more options on top of that. backend-dependent behavior, we love a flexible icon π
π METHODS π
Tirex::Map->get('foo')
Get a map by name. You hand it the name, it hands you the map. simple as π«Ά
Tirex::Map->clear();
Clears the list of maps. poof, gone, empty slate β¨
Tirex::Map->get_map_for_metatile($metatile)
Gets the map for a metatile. sounds chill right? WRONG (affectionately) because this one is dramatic π
- It will croak if the map named in the metatile does not exist π
- It will also croak if the zoom given in the metatile is out of range ππ
so like, respect the metatile or face the croak. iykyk.
Tirex::Map->new( ... )
Creates a new map configuration. main character energy, it's the constructor π
Default values, and this is important so write it down:
minz(minimum zoom) defaults to0maxz(maximum zoom) defaults to17
those are the defaults bestie, don't come for me π
Tirex::Map->new_from_configfile($filename, $renderer)
Creates a new map config from a file, for a given renderer. two args, one glow-up β¨
β οΈ Heads up: it croaks if the file does not exist. no file, no map, no mercy π
$map->get_name()
Gets the name of this map. iconic, brief, does exactly what it says π
$map->get_renderer()
Gets the renderer of this map. who's rendering? this map's renderer, that's who π¨
$map->get_filename()
Gets the filename of the config file for this map.
π¨ okay so listen: this only works if the map was created from a config file. If it wasn't, it will return undef. so if you get nothing back, that's not a bug, that's the map being like "no config file bestie, sorry" π
$map->get_tiledir()
Gets the tile directory of this map. your tiles live there, that's their home π
$map->get_minz()
Gets the minimum zoom value of this map. the floor, the basement, the starting point β¬οΈ
$map->get_maxz()
Gets the maximum zoom of this map. the ceiling, the limit, the final boss β¬οΈ
$map->to_s();
Returns a human readable description of this map. yes, human readable, because we're not doing cryptic nonsense today π«Ά
$map->to_hash();
Returns the parameters of this map as a hash. hash supremacy π₯
Tirex::Map->status();
Returns the status of all configured maps. all of them. every last one. go off king π
and that's the whole page, bestie!! you understood it, you slayed it, periodt π
this little documentation moment was brought to you by perl v5.40.1, dated 2026-08-09, and it lives at Tirex::Map(3pm) in the User Contributed Perl Documentation. mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: tirex 0.8.0+ds-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms