Layer With Style

Example

This is an example of a named layer definition that contains a style override.

In this example, the definition defines the attributes of a feature layer named World Capitals. The data for this feature layer is contained in a file named worldcap.tab on the local file system. The feature layer contains a style override named Style Override.

<?xml version="1.0" encoding="UTF-8"?>
<NamedLayer version="MXP_NamedResource_1_5" xmlns="http://www.mapinfo.com/mxp">
	<ConnectionSet/>
	<DataSourceDefinitionSet>
		<TABFileDataSourceDefinition id="id4" readOnly="false"> 
			<DataSourceName>worldcap</DataSourceName> 
			<FileName>@INSTALLDIR@/Mapping/world/worldcap.tab</FileName> 
		</TABFileDataSourceDefinition>
	</DataSourceDefinitionSet>
	<FeatureLayer id="id7" name="World Capitals" alias="worldcap" volatile="unknown"> 
		<Visibility visible="true">
			<VisibleRange enabled="false">
				<ZoomRange uom="mapinfo:length mi">0 0</ZoomRange>
			</VisibleRange>
		</Visibility>
		<DataSourceRef ref="id4" />
		<FeatureStyleModifierThemeList>
			<FeatureStyleOverrideTheme id="id6" name="Style Override" alias="FeatureStyleModifier2">
				<CompositeStyle>
					<NamedStyleRef resourceID="/NamedStyles/AreaStyle"/>
					<NamedStyleRef resourceID="/NamedStyles/PointStylePin"/>
					<MapinfoTextObjectStyle>
						<FontStyle family="Microsoft Sans Serif" font-style="normal" effect="white" effect-opacity="1" effect-type="none" font-weight="normal" text-decoration="none" text-case="default" shadow="false" expand="false" size="12" size-unit="mapinfo:length pt" stroke="black"/>
						<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
							<Pen>mapinfo:pen 2</Pen>
						</LineStyle>
					</MapinfoTextObjectStyle>
				</CompositeStyle>
			</FeatureStyleOverrideTheme>
		</FeatureStyleModifierThemeList>
	</FeatureLayer> 
</NamedLayer>