Named Label Source With a Range Theme

Example

This is an example of a named label source definition with a range theme.

<NamedLabelSource xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.mapinfo.com/mxp" version="MXP_NamedResource_1_5">
	<ConnectionSet />
	<DataSourceDefinitionSet>
		<NamedDataSourceDefinitionRef id="id1" resourceID="/Samples/NamedTables/USA"/>
	</DataSourceDefinitionSet>
	<LabelSource maxLabels="2147483647" name="STATES">
		<DataSourceRef ref="id1" />
		<BaseLabelProperties>
			<LabelProperties>
				<LabelVisibility visible="true" allowOverlap="false" allowDuplicates="all" allowOutOfView="false">
					<VisibleRange enabled="false">
						<ZoomRange uom="mapinfo:length mi" minInclusive="true" maxInclusive="false">0 0</ZoomRange>
					</VisibleRange>
				</LabelVisibility>
				<LabelText justification="center">
					<BaseLabelStyle>
						<FontStyle family="Arial" 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>State_Name</AttributeName>
							</StringValueExpression>
						</StringToken>
					</StringTokenList>
					<LabelCharacterLimit spacing="1">2147483647</LabelCharacterLimit>
				</LabelText>
				<LabelCallout visible="false" end="none">
					<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>
							</MapinfoNumericExpression>
						</NumericValueExpression>
					</MajorPriority>
					<MinorPriority>
						<NumericValueExpression>
							<MapinfoNumericExpression>
							</MapinfoNumericExpression>
						</NumericValueExpression>
					</MinorPriority>
				</LabelPriority>
			</LabelProperties>
		</BaseLabelProperties>
		<LabelThemeList>
			<LabelRangeTheme name="Ranged Label Theme by Pop_1990" alias="LabelModifier17" id="id4">
				<RangeValueExpression>
					<NumericValueExpression>
						<AttributeName>Pop_1990</AttributeName>
					</NumericValueExpression>
				</RangeValueExpression>
				<RangeThemeBaseLabelProperties applyStylePart="color">
					<LabelProperties>
						<LabelText>
							<BaseLabelStyle>
								<FontStyle family="Arial" 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>
						</LabelText>
						<LabelCallout>
							<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
								<Pen>mapinfo:pen 2</Pen>
							</LineStyle>
						</LabelCallout>
					</LabelProperties>
				</RangeThemeBaseLabelProperties>
				<LabelRangeThemeBinSet>
					<LabelRangeThemeBin>
						<NumericRange minInclusive="true" maxInclusive="false">400000 1000000</NumericRange>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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="gray" />
								</BaseLabelStyle>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</LabelRangeThemeBin>
					<LabelRangeThemeBin>
						<NumericRange minInclusive="true" maxInclusive="false">1000000 1500000</NumericRange>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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="rgb(160,96,96)" />
								</BaseLabelStyle>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</LabelRangeThemeBin>
					<LabelRangeThemeBin>
						<NumericRange minInclusive="true" maxInclusive="false">1500000 2500000</NumericRange>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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="rgb(192,64,64)" />
								</BaseLabelStyle>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</LabelRangeThemeBin>
					<LabelRangeThemeBin>
						<NumericRange minInclusive="true" maxInclusive="false">2500000 5000000</NumericRange>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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="rgb(224,32,32)" />
								</BaseLabelStyle>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</LabelRangeThemeBin>
					<LabelRangeThemeBin>
						<NumericRange minInclusive="true" maxInclusive="true">5000000 30000000</NumericRange>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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="red" />
								</BaseLabelStyle>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</LabelRangeThemeBin>
					<AllOthersLabelProperties>
						<LabelProperties>
							<LabelText>
								<BaseLabelStyle>
									<FontStyle family="Arial" 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>
							</LabelText>
							<LabelCallout>
								<LineStyle stroke="black" stroke-opacity="1" width="1" width-unit="mapinfo:imagesize pixel">
									<Pen>mapinfo:pen 2</Pen>
								</LineStyle>
							</LabelCallout>
						</LabelProperties>
					</AllOthersLabelProperties>
				</LabelRangeThemeBinSet>
				<RangeThemeBinValueConstraints>
					<RangeSpreadMethod allowEmptyRanges="true">equalSize</RangeSpreadMethod>
					<RoundTo>none</RoundTo>
				</RangeThemeBinValueConstraints>
				<RangeThemeBinStyleConstraints spreadMethod="color">
					<ColorSpreadMethod>rgb</ColorSpreadMethod>
					<SizeSpreadMethod>sqrt</SizeSpreadMethod>
				</RangeThemeBinStyleConstraints>
			</LabelRangeTheme>
		</LabelThemeList>
	</LabelSource>
</NamedLabelSource>