my $tile = Imager::Bing::MapLayer::Tile->new( quad_key => $key, # the "quad key" for the tile base_dir => $base_dir, # the base directory for tiles (defaults to cwd) overwrite => 1, # overwrite existing tile (default) vs load it autosave => 1, # automatically save tile when done (default) );
This is the the base tile class for Imager::Bing::MapLayer. It is intended for internal use, but can be subclassed as needed.
quad_key
The quadrant key of the tile.
level
The zoom level for this tile. It is determined by the "quad_key".
tile_coords
The tile coordinates of this tile. They are determined by the "quad_key".
pixel_origin
The coordinates of the top-left point on the tile. They are determined by the "quad_key".
width
The width of the tile.
height
The height of the tile.
image
The Imager object.
filename
The full pathname of the tile, when saved.
build_filename
This method returns the default filename of the tile, which consists of the "base_dir" and "quad_key". It can be overridden in subclasses for map systems that require alternative filenames.
latlon_to_pixel
Translate latitude and longitude to a pixel on this zoom level.
latlons_to_pixels
Translate a list reference of latitude and longitude coordinates to pixels on this zoom level.
save
Save this tile.
To install Imager::Bing::MapLayer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager::Bing::MapLayer
CPAN shell
perl -MCPAN -e shell install Imager::Bing::MapLayer
For more information on module installation, please visit the detailed CPAN module installation guide.