Feature Layer With a Named Label Source Reference - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

A feature layer can optionally reference a named label source using the namedLabelSourceRef attribute. This information indicates a label source that this feature layer can be labeled with. You can then either find a label layer containing that named label source to render the feature layer and label layer together, or manually construct an inline label layer inside a Render Map request. The Map Uploader utility inserts the label source reference inside the feature layer when uploading. The reference is only exposed through a Describe Named Layer or Describe Named Layers request in the REST Mapping Service.

Note: The sample named label source in this example will be provided in the /Samples folder as part of the version 12.0 release of Spectrum Technology Platform. For the 11.1 version, use WebDAV to copy the samples from the 11.1 patch zip or tar file to your repository.

Example

This is an example of a feature layer with the namedLabelSourceRef attribute.

<?xml version="1.0" encoding="UTF-8"?>
<NamedLayer version="MXP_NamedResource_1_5" xmlns="http://www.mapinfo.com/mxp">
	<ConnectionSet />
	<DataSourceDefinitionSet>
		<NamedDataSourceDefinitionRef id="id4" resourceID="/Samples/NamedTables/USA"/>
	</DataSourceDefinitionSet>
     <FeatureLayer id="id18" name="USA" alias="USA" volatile="unknown" 
		namedLabelSourceRef="/Samples/NamedLabelSources/StateNameLabelSource">
		<DataSourceRef ref="id4"/>
     </FeatureLayer>
</NamedLayer>