Map With Layer

Example

This is an example of a named map definition that contains named layers.

<?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>@INSTALLDIR@/Mapping/world/grid15.tab</FileName>
		</TABFileDataSourceDefinition>
		<TABFileDataSourceDefinition id="id3" readOnly="false">
			<DataSourceName>world</DataSourceName>
			<FileName>@INSTALLDIR@/Mapping/world/world.tab</FileName>
		</TABFileDataSourceDefinition>
		<TABFileDataSourceDefinition id="id2" readOnly="false">
			<DataSourceName>ocean</DataSourceName>
			<FileName>@INSTALLDIR@/Mapping/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>
			<NamedLayerRef resourceID="/NamedLayers/WorldcapFeatureLayer"/>
			<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>
			<FeatureLayer id="id9" name="World Countries" alias="world" volatile="unknown">
				<Visibility visible="true">
					<VisibleRange enabled="false">
						<ZoomRange uom="mapinfo:length mi">0 0</ZoomRange>
					</VisibleRange>
				</Visibility>
				<DataSourceRef ref="id3"/>
			</FeatureLayer>
			<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>