IMapServer Interface

Provides access to members for a MapService.

Description

When To Use

Members

Name Description
Method ComputeDistance Computes the distance between two points on the specified map. The result is in the map units of the specified map.
Method ComputeScale Computes the scale of the specified map, at the given map extent, for an image with the given size.
Read-only property DefaultMapName Name of the document's active map (data frame).
Read-only property DocumentInfo A set of name-value pairs for properties set for the map document (mxd only). These properties are string values set in the map document's Map Properties dialog and include: Title, Subject, Author, Category, Keywords and Comments.
Method ExportMapImage Generates an image of the map, based on the given map description, and writes the image to a specified file on disk. Supported file types are: 'bmp', 'jpg', 'tif', 'png'/'png8', 'png24', 'emf', 'ps', 'pdf', 'ai', 'gif', and 'svg'/'svgz'.
Read-only property FilePath The map document path.
Method Find Returns a collection of Map Server Find Result objects that contain the given search string. If LayerIDs is Nothing/Null or empty, all layers are searched.
Method FromMapPoints Converts a map coordinate to a screen location.
Method GetLegendInfo Returns a collection of Map Server Legend Info objects for the specified layers. If layerIDs is Nothing/Null or empty, legend information for all layers is returned.
Method GetServerInfo Returns information about a map (data frame).
Method GetSQLSyntaxInfo Returns the SQL syntax information for the specified layer.
Method GetSupportedImageReturnTypes The supported image return types for the map server. A value of esriImageReturnMimeData means that only MIME data is supported. Otherwise, either MIME data or URLs are supported.
Method Identify Returns a collection of Map Server Identify Result objects at the given location. If LayerIDs is Nothing/Null or empty, all layers are searched.
Read-only property MapCount The number of maps (data frames) in the document.
Read-only property MapName Name of the map (data frame) as indicated by the index. The first beginning with 0.
Read-only property PhysicalCacheDirectory The physical directory for cache files.
Read-only property PhysicalOutputDirectory The physical directory for output files.
Method QueryData Returns a record set of rows that meet the query filter selection criteria for the specified table.
Method QueryDataStatistics Calculates aggregate statistics for one or more fields on a table or layer.
Method QueryRasterValue Returns the Raster content that meet the selection criteria for the specified dynamic layer. Use QueryRasterValueEx instead of this for 64 bit OIDs.
Method QueryRelatedRecords Returns the IDs of the rows that meet the query filter selection criteria for the specified dynamic layer.
Method QueryRowCount Returns the count of the rows that meet the query filter selection criteria for the specified table.
Method QueryRowIDs Returns the IDs of the rows that meet the query filter selection criteria for the specified table. Use QueryRowIDsEx instead of this for 64 bit OIDs.
Method ToMapPoints Converts a screen location to a map coordinate.

IMapServer.ComputeDistance Method

Computes the distance between two points on the specified map. The result is in the map units of the specified map.

Public Function ComputeDistance ( _
    ByVal MapName As String, _
    ByVal fromPoint As IPoint, _
    ByVal toPoint As IPoint, _
    ByVal Units As esriUnits _
) As Double
public double ComputeDistance (
    string MapName,
    IPoint fromPoint,
    IPoint toPoint,
    esriUnits Units
);

IMapServer.ComputeScale Method

Computes the scale of the specified map, at the given map extent, for an image with the given size.

Public Function ComputeScale ( _
    ByVal mapDesc As IMapDescription, _
    ByVal mapDisplay As IImageDisplay _
) As Double
public double ComputeScale (
    IMapDescription mapDesc,
    IImageDisplay mapDisplay
);

IMapServer.DefaultMapName Property

Name of the document's active map (data frame).

Public ReadOnly Property DefaultMapName As String
public string DefaultMapName {get;}

IMapServer.DocumentInfo Property

A set of name-value pairs for properties set for the map document (mxd only). These properties are string values set in the map document's Map Properties dialog and include: Title, Subject, Author, Category, Keywords and Comments.

Public ReadOnly Property DocumentInfo As IPropertySet
public IPropertySet DocumentInfo {get;}

Remarks

Optimized MapServer also returns two additional properties � AntialiasingMode and TextAntialiasingMode. Return values for AntialiasingMode are Fastest, Fast, Normal, Best or None, TextAntialiasingMode returns None, Normal or Force.

IMapServer.ExportMapImage Method

Generates an image of the map, based on the given map description, and writes the image to a specified file on disk. Supported file types are: 'bmp', 'jpg', 'tif', 'png'/'png8', 'png24', 'emf', 'ps', 'pdf', 'ai', 'gif', and 'svg'/'svgz'.

Public Function ExportMapImage ( _
    ByVal mapDesc As IMapDescription, _
    ByVal imageDesc As IImageDescription _
) As IMapImage
public IMapImage ExportMapImage (
    IMapDescription mapDesc,
    IImageDescription imageDesc
);

Remarks

Use ExportMapImage to retrieve a file (image or vector format) of the map.

The input parameter MapDescription contains properties describing the map (also known as the data frame). These include the map's Name, the MapArea, the SpatialReference, as well as collections of LayerDescription objects. Size, resolution and file format are determined by the ImageDescription, which includes IImageDisplay and IImageType objects.

ExportMapImage returns a IMapImage object. MapExtent, MapScale and an array of VisibleLayers can be retrieved from the MapImage.

You can export the map to either a vector or an image type. This is specified by the ReturnType property of IImageType.

Setting the size and resolution of the output

Size and resolution are set in the ImageDisplay. Both Height and Width are required. The Height and Width properties of IImageResult are read-only and are not used to make changes.

You should be careful when specifying a DeviceResolution to the ImageDisplay. This is merely used by the map service to determine map scale on the server, it does not define the resolution of the map image. Changing the DeviceResolution may lead to unintended changes in the map scale. For example, you export a map image to JPG. You specify an image of 400 pixels by 600 pixels with the DeviceResolution set at 96. The relative MapScale of the resulting image is around 54,000,000. Next, you increase the DeviceResolution to 300 while keeping the size constant. The MapScale of this result is about 205,000,000. The result may not be want you wanted if the map contains layers or labels that are scale-dependent. In order to to maintain the MapScale at around 1:54,000,000 you would need to export a larger image.

If you are exporting to PDF you will need to keep in mind that PDF exits in page space. Setting the Height and Width sets the dimensions of the PDF page. For example, you export a map image to PDF where the ImageDisplay Height is 400 and the Width is 500. The DeviceResolution is 100. The resulting PDF is 4 inches by 5 inches. Holding the Height and Width settings constant, as you increase the DeviceResolution the actual size of the PDF will get smaller. As you decrease the DeviceResolution the size of the PDF gets larger. This will also affect MapScale. If you wish the MapScale to stay constant you will need to increase (or decrease) the ImageDisplay Height and Width values as you increase (or decrease) the DeviceResolution.

DeviceResolution also affects the symbols is rendered. For example, two map images were generated using the same size (250x250), same extent but a different DeviceResolution. The first map image was created with a DeviceResolution of 96 and the second one with 200. You will notice the symbols size differences between those two images. Symbology size is defined using points (1 point = 1/72 inch) in the source map. To determine symbology size in a map, DeviceResolution is used to convert from points to pixels with the following equation:

Symbol Size in Points * (DeviceResolution/Number of Points in 1 inch)In the map image with 96 DeviceResolution, a symbol size of 1 point will use 1.33 pixels (rounded down to 1 pixel) to render. In the map image with 200 DeviceResolution, a symbol size of 1 point will use 2.78 (rounded up to 3 pixels) to render. As a result, the symbology appears larger in the map image created using a DeviceResolution of 200.

Image quality and image type of optimized MapServer

  • Optimized MapServices allow the author of the MapService to set general anti-aliasing options and text anti-aliasing options in the source document (.msd), resulting in a better quality image. A user may use the DocumentInfo property to find out whether the map has anti-aliasing enabled.
  • Output images may contain artifacts if a client requests a png8 image and the MapService has anti-aliasing enabled, especially when the map's content uses more than 256 colors. The artifacts can occur because anti-aliasing effectively increases the number of colors in the map. If the number of colors in the map increases beyond 256 colors (the limit of a png8 image) then dithering may occur, resulting in a "grainy" appearance in areas of solid color. When anti-aliasing is enabled on the map, use png24 or png32 image formats to obtain higher quality images.
  • Optimized MapServices add support for the image type PNG32 which allows the use of an alpha band (in addition to RGB bands) to support pixel level transparency. When using the PNG32 format, transparency set on layers in the map gets carried over to the output image. This means that the client application does not need to set any client side transparency when draping the service on top of another map service. Use the ServiceConfigurationInfo property set to find out whether a map service supports PNG32.
  • Image formats supported by optimized MapServices are "PNG32, PNG24, PNG, JPG, DIB, TIFF , EMF, PS, PDF, GIF, SVG, SVGZ"
  • Standard MapServices support "PNG24, PNG, JPG, DIB, TIFF, EMF, PS, PDF, GIF, SVG, SVGZ, AI".

Miscellaneous

Exporting a map from a cached service does not generate map dynamically, instead it creates map using pre-cooked cache tiles.

Exporting a map is different than exporting a layout. Page space is an important component of ExportLayout. It exists for all map documents and the map services the documents are based on. This page space provides the default size of the exported layout (for best results you should use this default). Page space does not exist in ExportMapImage. Therefore, you will see differences in results when adjusting the Height, Width or DeviceResolution for a ExportMapImage as compared to making similar adjustments for ExportLayout.

Use IMapServerGeoTransformation when the image output from a map service is to be displayed in a coordinate system where the underlying geographic coordinate system is different than the underlying geographic coordinate system of the DefaultMapDescription.

Example: exporting map for a given time

IMapTimeDescription pMapTimeDesc = pMapDesc as IMapTimeDescription;

ITime pTime = new TimeClass();

 // date-time in YYYY/MM/DD hh:mm:ss format

 pTime.SetFromTimeString(esriTimeStringFormat.esriTSFYearThruSecondWithSlash, "2000/01/01 09:00:00");

ITimeInstant pTimeInstant = new TimeInstantClass();

 pTimeInstant.Time = pTime;

 pTimeInstant.TimeReference = pMapTimeDesc.TimeReference;

pMapTimeDesc.TimeValue = pTimeInstant;

IImageDisplay pImgDisp = new ImageDisplayClass();

 pImgDisp.DeviceResolution = 96;

 pImgDisp.Height = 500;

 pImgDisp.Width = 500;

IImageType pImgType = new ImageTypeClass();

 pImgType.Format = esriImageFormat.esriImagePNG;

 pImgType.ReturnType = esriImageReturnType.esriImageReturnURL;

IImageDescription pImageDesc = new ImageDescriptionClass();

 pImageDesc.Display = pImgDisp;

 pImageDesc.Type = pImgType;

IMapImage pMapImage = pMapServer.ExportMapImage(pMapDesc, pImageDesc);

 Console.WriteLine(pMapImage.URL);

IMapServer.FilePath Property

The map document path.

Public ReadOnly Property FilePath As String
public string FilePath {get;}

IMapServer.Find Method

Returns a collection of Map Server Find Result objects that contain the given search string. If LayerIDs is Nothing/Null or empty, all layers are searched.

Public Function Find ( _
    ByVal mapDesc As IMapDescription, _
    ByVal MapImage As IImageDisplay, _
    ByVal searchString As String, _
    ByVal Contains As Boolean, _
    ByVal searchFields As String, _
    ByVal option As esriFindOption, _
    ByVal LayerIDs As ILongArray _
) As IMapServerFindResults
public IMapServerFindResults Find (
    IMapDescription mapDesc,
    IImageDisplay MapImage,
    string searchString,
    bool Contains,
    string searchFields,
    esriFindOption option,
    ILongArray LayerIDs
);

Remarks

Find performs a search based on a string value. This search can be conducted on a single field of a single layer, on many fields of a single layer or on many fields on many layers. Find returns a collection of objects that implement IMapServerFindResult.

Find requires a number of input parameters. These include: a MapDescription, an ImageDisplay, the search string, a Boolean value on whether the search string is an exact match (False) or not (True), a comma delimited list of string values for the names of the fields you want to search, the esriFindOption, and an array of layer Ids to be searched.

Please note that Find only works with layer and does not work with StandaloneTable. It also does not honor any time setting of a layer.

MapDescription

The MapDescription contains all the LayerDescriptions in the map. These LayerDescriptions include a DefinitionExpression property. A DefinitionExpression can be set on a layer in order to limit layer features available for display or query. This expression can be set in the source map document as a definition query, or can be set using the DefinitionExpression property. The DefinitionExpression set in the LayerDescription will override any any definition query set in the source map. MapServer Find results should honor any definition query or DefinitionExpression set on the layer.

ImageDisplay

This is needed to determine whether layers are visible or not based on the current map scale.

Search Fields

If the searchFields parameter is blank all fields will be searched.

esriFindOption

The esriFindOption parameter includes: esriFindAllLayers and esriFindVisibleLayers. If esriFindAllLayers is being used all layers are valid. If esriFindVisibleLayers is used, the search will be conducted only on layers that are visible in the map display. Layer visibility depends on whether the layer is on or off (the Visible property on ILayerDescription) or whether the layer is on, but not visible due to scale dependencies (the MinScale and MaxScale properties on IMapLayerInfo). The mapImage parameter is needed to determine whether the layer is not visible based on scale dependencies. This parameter can be Nothing/Null if esriFindAllLayers is used.

The parameters esriFindOption and LayerIDs behave like a boolean AND. There is no precedence. For example: if esriFindOption is esriFindVisibleLayers and pLayerIDs is Nothing/Null or empty, all the visible layers are searched. If esriFindOption is esriFindVisibleLayers and pLayerIDs contains only the first layer, the first layer is searched only if it is visible.

**Results**

Find always honors field visibility, and by default it respects field aliases and field formatting set in the source map document. If you want to use field names instead of field aliases, set ReturnFieldNamesInResults to True. When you want to have value in original data type (i.e. as Double instead of formatted string) so that you can do some computation (e.g. change the numeric or date to your locale settings), set FormatValuesInResults to False. It is important to note that these properties are only honored when the layer being searched implements IFeatureLayer (e.g. FeatureLayer). If the feature being queried has more than one field with the same alias (e.g. when joined), only one will be passed back to the client and the rest will be dropped from the result.

Geometry is always returned in the same spatial reference system as the DefaultMapDescription, even though the source data of a layer may be in a different coordinate system. The value of the Shape field in the result is a string showing the type of the geometry. To get the geometry associated with the result, use the IMapServerFindResult::FeatureShape property.

In some cases, for performance reasons, you may want limit or adjust the geometry being returned in the find result. Use ILayerResultOptions to manage this. If IncludeGeometry is set to False, FeatureShape returns nothing. This should increase performance in cases where feature geometry is large. When ILayerResultOptions is not used, FeatureShape returns geometry. If the Shape field is invisible in the source map, FeatureShape may still contain geometry depending on how IncludeGeometry is set by the user. You can also choose to densify or generalize the geometry returned in FeatureShape using GeometryResultOptions. Densification is used to better support clients that do not support Arcs (e.g. Bezier, Circular etc.). Generalization reduces the amount of geography being sent across the network and should lead to better performance. If LayerResultOptions are not specified for the LayerDescription, query results will include the original geometry.

Miscellaneous

There are two key differences between Find and the other query methods such as QueryData, QueryRowIDs, QueryFeatureData, etc. The first is that Find can work on multiple layers while the query methods work with a single layer. The second is that Find only works with a search string. The query methods use a queryFilter as a parameter. This allows the query to be based on either an attribute filter (SQL expression) or a spatial filter.

IMapServer.FromMapPoints Method

Converts a map coordinate to a screen location.

Public Sub FromMapPoints ( _
    ByVal MapDescription As IMapDescription, _
    ByVal mapDisplay As IImageDisplay, _
    ByVal mapPoints As IPointCollection, _
    ByRef screenXValues As ILongArray, _
    ByRef screenYValues As ILongArray _
)
public void FromMapPoints (
    IMapDescription MapDescription,
    IImageDisplay mapDisplay,
    IPointCollection mapPoints,
    ref ILongArray screenXValues,
    ref ILongArray screenYValues
);
The following sample code shows how to convert the upper left corner of your map extent (map coordinates) to a screen location. It assumes that you already have a valid MapServer and MapDescription object, and that you are not working with a server context. However, if you are developing an ArcGIS for Server application using a server context, you should not use New to create local ArcObjects, but you should always create objects within the server by calling CreateObject on IServerContext.

IMapServer.GetLegendInfo Method

Returns a collection of Map Server Legend Info objects for the specified layers. If layerIDs is Nothing/Null or empty, legend information for all layers is returned.

Public Function GetLegendInfo ( _
    ByVal pMapDescription As IMapDescription, _
    ByVal pImageDisplay As IImageDisplay, _
    ByVal LayerIDs As ILongArray, _
    ByVal patch As IMapServerLegendPatch, _
    ByVal imgType As IImageType _
) As IMapServerLegendInfos
public IMapServerLegendInfos GetLegendInfo (
    IMapDescription pMapDescription,
    IImageDisplay pImageDisplay,
    ILongArray LayerIDs,
    IMapServerLegendPatch patch,
    IImageType imgType
);

Remarks

Use GetLegendInfo to retrieve individual legend elements including the symbol image, labels, descriptions and headings. A common use would be to populate a table of contents. Note that composite layers such as group layers and annotation layers do not contain legend elements. To export a single image of the legend use ExportLegend on IMapServerLayout.

The GetLegendInfo method returns a collection of MapServerLegendInfo objects. Legends are associated with renderers that belong to each layer in a map. Each layer has a separate renderer. Each renderer has one or more legend groups. Each legend group has one or more legend classes. Customizing the legend patch can be done using IMapServerLegendPatch . When passing in "Nothing" for this input parameter ("patch") the default legend patch is used.

MapServerLegendInfo doesn't contain information about whether the data frame and the layers in the TOC are expanded or collapsed in the original map document. You have to write your own code to find this out.

The following sample code shows how to determine whether the data frame and the layers in the TOC are expanded or collapsed in the original map document. The sample assumes that you already have a valid MapServer object.

IMapServer.GetServerInfo Method

Returns information about a map (data frame).

Public Function GetServerInfo ( _
    ByVal MapName As String _
) As IMapServerInfo
public IMapServerInfo GetServerInfo (
    string MapName
);

Remarks

This method returns a MapServerInfo object. Using IMapServerInfo you can retrieve information regarding the present state of the MapServer object. If two (or more) data frames have the same name, Map Server adds a distinctive number at the end of the second name. E.g. Layers and Layers2.

IMapServer.GetSQLSyntaxInfo Method

Returns the SQL syntax information for the specified layer.

Public Function GetSQLSyntaxInfo ( _
    ByVal MapName As String, _
    ByVal LayerID As Integer _
) As ISQLSyntaxInfo
public ISQLSyntaxInfo GetSQLSyntaxInfo (
    string MapName,
    int LayerID
);

IMapServer.GetSupportedImageReturnTypes Method

The supported image return types for the map server. A value of esriImageReturnMimeData means that only MIME data is supported. Otherwise, either MIME data or URLs are supported.

Public Function GetSupportedImageReturnTypes ( _
) As esriImageReturnType
public esriImageReturnType GetSupportedImageReturnTypes (
);

IMapServer.Identify Method

Returns a collection of Map Server Identify Result objects at the given location. If LayerIDs is Nothing/Null or empty, all layers are searched.

Public Function Identify ( _
    ByVal mapDesc As IMapDescription, _
    ByVal MapImage As IImageDisplay, _
    ByVal searchShape As IGeometry, _
    ByVal Tolerance As Integer, _
    ByVal option As esriIdentifyOption, _
    ByVal LayerIDs As ILongArray _
) As IMapServerIdentifyResults
public IMapServerIdentifyResults Identify (
    IMapDescription mapDesc,
    IImageDisplay MapImage,
    IGeometry searchShape,
    int Tolerance,
    esriIdentifyOption option,
    ILongArray LayerIDs
);

Remarks

Identify returns map features and their attribute values based on a search location. This can be conducted on an individual layer, the top-most layer, all layers, or just on all the visible layers. This method returns a collection of objects that implement IMapServerIdentifyResult.

Identify requires a number of input parameters. These include: a MapDescription, an ImageDisplay, a search shape, a tolerance, the esriIdentifyOption, and an array of layer Ids to be identified. Please note that it does not work with StandaloneTable.

Time aware layer

Identify recognizes time settings of a layer. When a layer's UseTime is true and MapDescription's TimeValue is set, Identify only searches features that fall within the time frame.

Layer with HTMLPopup

Identify can return results additionally in rich html format. When a layer's HTMLPopupType is not esriServerHTMLPopupTypeNone, you can use one of identify two htmlpopup options to get identify result in html format the way it is authored.

MapDescription

The MapDescription contains all the LayerDescriptions in the map. These LayerDescriptions include a DefinitionExpression property. A DefinitionExpression can be set on a layer in order to limit layer features available for display or query. This expression can be set in the source map document as a definition query, or can be set using the DefinitionExpression property. The DefinitionExpression set in the LayerDescription will override any any definition query set in the source map. MapServer Identify results should honor any definition query or DefinitionExpression set on the layer.

ImageDisplay

This is needed to determine whether layers are visible or not based on the current map scale.

SearchShape

Geometry set in ISpatialFilter should meet the following criteria:

  • It should have the Spatial Reference System defined. In cases where it is not defined, the coordinate system is assumed to be in DataFrame�s coordinate system
  • It must be one of the high-level geometries i.e. Point, Multipoint, Polyline, Polygon or Multipatch. Low-level geometry e.g. BezierCurve, CircularCurve must be wrapped into a high-level geometry
  • It must be topologically correct. For more information, see help on IPolygon and ITopologicalOperator::Simplify .

Tolerance

Tolerance is the distance in which features are searched. The unit is in pixel. It is only used for when SearchShape is a point.

esriIdentifyOption

The esriIdentifyOption parameter includes: esriIdentifyAllLayers, esriIdentifyVisibleLayers and esriIdentifyTopmost. If esriIdentifyAllLayers is being used all features for all layers in the map that fall within the tolerance value of the searchShape will be returned. If esriIdentifyVisibleLayers is used then only features from visible layers are returned. Layer visibility depends on whether the layer is on or off (the Visible property on ILayerDescription) or whether the layer is on, but not visible due to scale dependencies (the MinScale and MaxScale properties on IMapLayerInfo). The mapImage parameter is needed to determine whether the layer is not visible based on scale dependencies. The esriIdentifyOption esriIdentifyTopmost refers to the visible layer that is topmost in the map drawing order at the location specified by searchShape.

Layer IDs

The parameters esriIdentifyOption and LayerIDs behave like a boolean AND. There is no precedence. For example: if esriIdentifyOption is esriIdentifyVisibleLayers and pLayerIDs is Nothing/Null or empty, all the visible layers are searched. If esriIdentifyOption is esriIdentifyVisibleLayers and pLayerIDs contains only the first layer, the first layer is searched only if it is visible.

Results

Identify always honors field visibility, and by default it respects field aliases and field formatting set in the source map document. If you want to use field names instead of field aliases, set ReturnFieldNamesInResults to True. When you want to have value in original data type (i.e. as Double instead of formatted string) so that you can do some computation (e.g. change the numeric or date to your locale settings), set FormatValuesInResults to False. It is important to note that these properties are only honored when the layer being identified implements IFeatureLayer (e.g. FeatureLayer).

Geometry is always returned in the same spatial reference system as the DefaultMapDescription, even though the source data of a layer may be in a different coordinate system. The value of the Shape field in the IMapServerIdentifyResult::PropetySet or in related IMapServerRow::PropertySet is a string showing the type of the geometry. To get the geometry associated with the result, use the IMapServerIdentifyResult::Shape property instead. Identify does not return geometry associated with any related feature. If the feature being identified has more than one field with the same name, only one will be passed back to the client and the rest will be dropped from the result.

In some cases, for performance reason, you may want limit or adjust the geometry being returned in the identify result. Use ILayerResultOptions to manage this. If IncludeGeometry is set to False, Shape property returns nothing. This should increase performance in cases where feature geometry is large. When ILayerResultOptions is not used, the Shape property returns geometry. If the Shape field is invisible in the source map, the Shape property may still contain geometry depending on how IncludeGeometry is set by the user. You can also choose to densify or generalize the returned geometry by using GeometryResultOptions. Densification is used to better support clients that do not support Arcs (e.g. Bezier, Circular etc.). Generalization reduces the amount of geography being sent across the network and should lead to better performance.

Miscellaneous

If the layer being identified has a relationship to other tables, the IMapServerRelationship and IMapServerRow interfaces provide access to properties of the relationship and related tables.

It assumes that you already have a validServerContext,MapServer,MapDescription andImageDisplay objects and that you are working with a server context. However, if you are not developing an ArcGIS for Server application using a server context, you should use New to create local ArcObjects instead of usingCreateObject onIServerContext.

IMapServer.MapCount Property

The number of maps (data frames) in the document.

Public ReadOnly Property MapCount As Integer
public int MapCount {get;}

IMapServer.MapName Property

Name of the map (data frame) as indicated by the index. The first beginning with 0.

Public Function get_MapName ( _
    ByVal Index As Integer _
) As String
public string get_MapName (
    int Index
);

IMapServer.PhysicalCacheDirectory Property

The physical directory for cache files.

Public ReadOnly Property PhysicalCacheDirectory As String
public string PhysicalCacheDirectory {get;}

IMapServer.PhysicalOutputDirectory Property

The physical directory for output files.

Public ReadOnly Property PhysicalOutputDirectory As String
public string PhysicalOutputDirectory {get;}

IMapServer.QueryData Method

Returns a record set of rows that meet the query filter selection criteria for the specified table.

Public Function QueryData ( _
    ByVal MapName As String, _
    ByVal pMapTableDescription As IMapTableDescription, _
    ByVal Filter As IQueryFilter, _
    ByVal options As IQueryResultOptions _
) As IQueryResult
public IQueryResult QueryData (
    string MapName,
    IMapTableDescription pMapTableDescription,
    IQueryFilter Filter,
    IQueryResultOptions options
);

IMapServer.QueryDataStatistics Method

Calculates aggregate statistics for one or more fields on a table or layer.

Public Function QueryDataStatistics ( _
    ByVal MapName As String, _
    ByVal pTableDescription As IMapTableDescription, _
    ByVal pRequest As IStatisticsRequest, _
    ByVal pQueryFilter As IQueryFilter _
) As IRecordSet
public IRecordSet QueryDataStatistics (
    string MapName,
    IMapTableDescription pTableDescription,
    IStatisticsRequest pRequest,
    IQueryFilter pQueryFilter
);

IMapServer.QueryRasterValue Method

Returns the Raster content that meet the selection criteria for the specified dynamic layer. Use QueryRasterValueEx instead of this for 64 bit OIDs.

Public Function QueryRasterValue ( _
    ByVal MapName As String, _
    ByVal pTableDescription As IMapTableDescription, _
    ByVal rowIDs As ILongArray, _
    ByVal FieldName As String, _
    ByVal rasterValueType As IImageType _
) As IImageResults
public IImageResults QueryRasterValue (
    string MapName,
    IMapTableDescription pTableDescription,
    ILongArray rowIDs,
    string FieldName,
    IImageType rasterValueType
);

IMapServer.QueryRelatedRecords Method

Returns the IDs of the rows that meet the query filter selection criteria for the specified dynamic layer.

Public Function QueryRelatedRecords ( _
    ByVal MapName As String, _
    ByVal pTableDescription As IMapTableDescription, _
    ByVal pFIDs As IFIDSet, _
    ByVal RelateDescription As IRelateDescription _
) As IQueryResult
public IQueryResult QueryRelatedRecords (
    string MapName,
    IMapTableDescription pTableDescription,
    IFIDSet pFIDs,
    IRelateDescription RelateDescription
);

IMapServer.QueryRowCount Method

Returns the count of the rows that meet the query filter selection criteria for the specified table.

Public Function QueryRowCount ( _
    ByVal MapName As String, _
    ByVal pTableDescription As IMapTableDescription, _
    ByVal pFilter As IQueryFilter _
) As Integer
public int QueryRowCount (
    string MapName,
    IMapTableDescription pTableDescription,
    IQueryFilter pFilter
);

IMapServer.QueryRowIDs Method

Returns the IDs of the rows that meet the query filter selection criteria for the specified table. Use QueryRowIDsEx instead of this for 64 bit OIDs.

Public Function QueryRowIDs ( _
    ByVal MapName As String, _
    ByVal pTableDescription As IMapTableDescription, _
    ByVal pFilter As IQueryFilter _
) As ILongArray
public ILongArray QueryRowIDs (
    string MapName,
    IMapTableDescription pTableDescription,
    IQueryFilter pFilter
);

IMapServer.ToMapPoints Method

Converts a screen location to a map coordinate.

Public Function ToMapPoints ( _
    ByVal MapDescription As IMapDescription, _
    ByVal mapDisplay As IImageDisplay, _
    ByVal screenXValues As ILongArray, _
    ByVal screenYValues As ILongArray _
) As IPointCollection
public IPointCollection ToMapPoints (
    IMapDescription MapDescription,
    IImageDisplay mapDisplay,
    ILongArray screenXValues,
    ILongArray screenYValues
);

Classes that implement IMapServer

Classes Description
MapServer The MapServer component provides programmatic access to the contents of a map document on disk, and creates images of the map contents based on user requests. Designed for use in building map-based web services and web applications.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.