Feature Layer With a Named Label Source Reference

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.


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 />
		<NamedDataSourceDefinitionRef id="id4" resourceID="/Samples/NamedTables/USA"/>
     <FeatureLayer id="id18" name="USA" alias="USA" volatile="unknown" 
		<DataSourceRef ref="id4"/>