Creating Legends for a Raster Layer - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
ft:locale
en-US
Product name
MapBasic
ft:title
MapInfo MapBasic Reference
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:32:32.686000

You can use a raster layer for map_layer_id and map_layer_name when the raster layer supports legends. Only the image file formats supported by the Advanced Raster product have the ability to create raster legends. The file formats supported in Advanced Raster can be found on the PRO tab by clicking Options. Under the MapInfo Pro Raster section, click Preferences to see a list of the supported raster formats.

Most of the Create Designer Legend statement applies to raster legends except for the Using clause. When a Frame From Layer clause contains a Using clause, a raster layer returns an error and does not create the legend. The Using clause does not apply to raster legend frames, because it refers to vector table elements like columns and label expressions.