FeatureLayer in Named Map
Example
This is an example of a named map with three feature layers (World Capitals, Grid and Ocean) that are defined by their visibility and a reference to the data source. The World layer is a named layer that references a named table.
<?xml version="1.0" encoding="UTF-8"?>
<NamedMapDefinition version="MXP_NamedResource_1_5" xmlns="http://www.mapinfo.com/mxp" xmlns:gml="http://www.opengis.net/gml">
<ConnectionSet />
<DataSourceDefinitionSet>
<TABFileDataSourceDefinition id="id1" readOnly="false">
<DataSourceName>grid15</DataSourceName>
<FileName>E:\Spectrum/server/modules/spatial/samples/data/world/grid15.tab</FileName>
</TABFileDataSourceDefinition>
<TABFileDataSourceDefinition id="id4" readOnly="false">
<DataSourceName>worldcap</DataSourceName>
<FileName>E:\Spectrum/server/modules/spatial/samples/data/world/worldcap.tab</FileName>
</TABFileDataSourceDefinition>
<TABFileDataSourceDefinition id="id2" readOnly="false">
<DataSourceName>ocean</DataSourceName>
<FileName>E:\Spectrum/server/modules/spatial/samples/data/world/ocean.tab</FileName>
</TABFileDataSourceDefinition>
</DataSourceDefinitionSet>
<MapDefinition id="id5" name="MyMap" alias="">
<DisplayConditions>
<MapSize uom="mapinfo:imagesize pixel">
<ImageWidth>960</ImageWidth>
<ImageHeight>800</ImageHeight>
</MapSize>
<ZoomAndCenter>
<MapZoom uom="mapinfo:length mi">28014.44036</MapZoom>
<gml:Point srsName="mapinfo:coordsys 12,62,7,0">
<gml:coordinates>-5.4419258,0</gml:coordinates>
</gml:Point>
</ZoomAndCenter>
<DisplayCoordSys>
<SRSName>mapinfo:coordsys 12,62,7,0</SRSName>
</DisplayCoordSys>
<ResizeMethod>preserveZoom</ResizeMethod>
<RasterConditions dither="halfTone" rasterReprojectionResampling="cubicConvolution" rasterReprojection="none" trueColor="true" optimizeRasterLayers="screen" optimizeVectorLayers="screen"/>
<RenderingOptions enableOpacity="true" enableAntiAlias="true"/>
</DisplayConditions>
<LayerList>
<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" />
</FeatureLayer>
<FeatureLayer id="id8" name="Grid" alias="grid15" volatile="unknown">
<Visibility visible="true">
<VisibleRange enabled="false">
<ZoomRange uom="mapinfo:length mi">0 0</ZoomRange>
</VisibleRange>
</Visibility>
<DataSourceRef ref="id1" />
</FeatureLayer>
<NamedLayerRef name="World" resourceID="/Samples/NamedLayers/WorldFeatureLayer"/>
<FeatureLayer id="id10" name="Ocean (Robinson)" alias="ocean" volatile="unknown">
<Visibility visible="true">
<VisibleRange enabled="false">
<ZoomRange uom="mapinfo:length mi">0 0</ZoomRange>
</VisibleRange>
</Visibility>
<DataSourceRef ref="id2" />
</FeatureLayer>
</LayerList>
</MapDefinition>
</NamedMapDefinition>