Modifying Style Overrides for a Layer - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Excluding the Add keyword from the Override clause modifies the properties for an existing multiple style override definition within a layer specified by the integer index (1-based) or the override name.

Syntax

Set Map 
	[ Window window_id ] 
	[ Layer layer_id 
		 [ MODIFYSTYLEOVERRIDE_CLAUSE ]
		 [ MODIFYSTYLEOVERRIDE_CLAUSE ] ... ]

Where MODIFYSTYLEOVERRIDE_CLAUSE is:

[ [ Style ] Override { override_index | override_name } { 
	[ Zoom ( min_zoom, max_zoom ) ]
	[ Units dist_unit ] 
	[ { Alpha alpha_value } | { Translucency translucency_percent } ]
	[ Enable { On | Off } ]
	[ Arrows { On | Off } ]
	[ Centroids { On | Off } ]
	[ Nodes { On | Off } ]
	[ Line...] [ , Line... ] 
	[ Pen...] [ , Pen... ] ...
	[ Symbol... ] [ , Symbol... ] ...
	[ Brush... ] [ , Brush... ] ...
	[ Font... ] } ] 

window_id is the integer window identifier of a Map window.

layer_id identifies which layer to modify; can be a SmallInt (for example, use 1 to specify the top map layer other than Cosmetic) or a string representing the name of a table displayed in the map.

override_index is an integer index (1-based) for the override definition within the layer. Each override is tied to an zoom range and is ordered so that the smallest zoom range value is on top (index 1).

override_name is the user specified override name.

min_zoom is a numeric expression, identifying the minimum zoom at which the style override will come into effect

max_zoom is a numeric expression, identifying the maximum zoom at which the style override will come into effect

dist_unit is a string expression, specifying the units for the map (such as "mi" for miles, "m" for meters; see Set Distance Units statement for a list of available unit names). This is an optional parameter. If not present, the distance units from the table's coordinate system are used.

alpha_value is an integer value representing the alpha channel value for translucency. Values range from 0-255. 0 is completely transparent. 255 is completely opaque. Values between 0-255 make the image layer display translucent.

translucency_percent is an integer value representing the percentage of translucency for a vector, raster, or grid image layer. Values range between 0-100. 0 is completely opaque. 100 is completely transparent.

Note: Specify either Alpha or Translucency but not both, since they are different ways of specifying the same result. If you specify multiple keywords, the last value will be used.

Description

Arrows turns the display of direction arrows on or off.

Centroids turns the display of centroids on or off.

Nodes turns the display of nodes on or off.

Line specifies the style used to display line and polyline objects. A Line clause is identical to a Pen clause, except for the use of the keyword Line instead of Pen.

Pen is a valid Pen clause that specifies the style used to display the borders of filled objects.

Symbol is a valid Symbol clause that specifies the style used to display point objects.

Brush is a valid Brush clause that specifies the style used to display filled objects.

Font is a valid Font clause that specifies the font used to display text objects.

For more information about style overrides for layers, see Adding Style Overrides to a Layer and Enabling, Disabling, or Removing Overrides for a Layer. See also,LayerStyleInfo( ) function and StyleOverrideInfo( ) function.

Example

Set Map Layer 1 Style Override 1 Alpha 119