Layer With Inline Label Source

Example

This is an example of a named layer definition for a LabelLayer that contains an inline label source.


<?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>E:\Spectrum/server/modules/spatial/samples/data/world/worldcap.tab</FileName>
		</TABFileDataSourceDefinition>
	</DataSourceDefinitionSet>
	<LabelLayer id="id6" name="Labels" alias="Layer2" volatile="unknown">
		<Visibility visible="true">
			<VisibleRange enabled="false">
				<ZoomRange uom="mapinfo:length mi">0 0</ZoomRange>
			</VisibleRange>
		</Visibility>
		<LabelSourceList>
			<LabelSource maxLabels="2147483647" name="World Countries">
				<Visibility visible="true">
					<VisibleRange enabled="true">
						<ZoomRange uom="mapinfo:length mi">0 6000</ZoomRange>
					</VisibleRange>
				</Visibility>
				<DataSourceRef ref="id4" />
				<BaseLabelProperties>
					<LabelProperties>
						<LabelVisibility visible="true" allowOverlap="true" allowDuplicates="all" allowOutOfView="false">
							<VisibleRange enabled="false">
								<ZoomRange uom="mapinfo:length mi">0 100000
								</ZoomRange>
							</VisibleRange>
						</LabelVisibility>
						<LabelText justification="center">
							<BaseLabelStyle>
								<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"/>
							</BaseLabelStyle>
							<StringTokenList>
								<StringToken>
									<StringValueExpression>
										<AttributeName>Country</AttributeName>
									</StringValueExpression>
								</StringToken>
							</StringTokenList>
							<LabelCharacterLimit spacing="1">2147483647</LabelCharacterLimit>
						</LabelText>
						<LabelCallout visible="false" end="arrow">
							<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
								<Pen>mapinfo:pen 2</Pen>
							</LineStyle>
						</LabelCallout>
						<LabelReferencePosition recalculate="outOfView">
							<LineLabelPositionInterval>0</LineLabelPositionInterval>
						</LabelReferencePosition>
						<LabelLayout>
							<Alignment>
								<HorizontalAlignment>center</HorizontalAlignment>
								<VerticalAlignment>center</VerticalAlignment>
							</Alignment>
							<Offset uom="mapinfo:imagesize pixel">
								<XOffset>0</XOffset>
								<YOffset>0</YOffset>
							</Offset>
							<LabelAngle uom="degrees" origin="referencePoint">0</LabelAngle>
						</LabelLayout>
						<LabelBaseSize useScale="false">
							<MapScale>0</MapScale>
						</LabelBaseSize>
						<LabelPriority>
							<MajorPriority>
								<NumericValueExpression>
									<MapinfoNumericExpression/>
								</NumericValueExpression>
							</MajorPriority>
							<MinorPriority>
								<NumericValueExpression>
									<MapinfoNumericExpression/>
								</NumericValueExpression>
							</MinorPriority>
						</LabelPriority>
					</LabelProperties>
				</BaseLabelProperties>
				<LabelThemeList/>
			</LabelSource>
		</LabelSourceList>
	</LabelLayer>
</NamedLayer>