com.esri.arcgis.carto
Interface IMapServer4

All Superinterfaces:
Serializable
All Known Implementing Classes:
MapServerIP, MapServerLP

public interface IMapServer4
extends Serializable

Provides access to members that serve maps.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 double computeDistance(String mapName, IPoint fromPoint, IPoint toPoint, int units)
          Computes the distance between two points on the specified map.
 double computeScale(IMapDescription mapDesc, IImageDisplay mapDisplay)
          Computes the scale of the specified map, at the given map extent, for an image with the given size.
 IMapImage exportMapImage(IMapDescription mapDesc, IImageDescription imageDesc)
          Generates an image of the map, based on the given map description, and writes the image to a specified file on disk.
 IImageResult exportScaleBar(IScaleBar scalebar, IMapDescription mapDesc, IImageDisplay pMapDisplay, IColor backgroundColor, IImageDescription imageDesc)
          Exports a scale bar to an image file.
 IMapServerFindResults find(IMapDescription mapDesc, IImageDisplay mapImage, String searchString, boolean contains, String searchFields, int option, ILongArray layerIds)
          Returns a collection of Map Server Find Result objects that contain the given search string.
 void fromMapPoints(IMapDescription mapDescription, IImageDisplay mapDisplay, IPointCollection mapPoints, ILongArray[] screenXValues, ILongArray[] screenYValues)
          Converts a map coordinate to a screen location.
 IFeatureRenderer generateDataClasses(String mapName, IMapTableDescription pTableDescription, IDataClassificationDef pDataClassificationDef)
          Returns the class breaks or unique values for the specified dynamic layer.
 ILayerDrawingDescriptions getDefaultLayerDrawingDescriptions(String mapName, ILongArray pLayerIDs, IServerSymbolOutputOptions outputOptions)
          Get Layer Drawing Description
 String getDefaultMapName()
          Name of the document's active map (data frame).
 IPropertySet getDocumentInfo()
          A set of name-value pairs for properties set for the map document (mxd only).
 IMapServerLegendInfos getLegendInfo(String mapName, ILongArray layerIds, IMapServerLegendPatch patch, IImageType imgType)
          Returns a collection of Map Server Legend Info objects for the specified layers.
 IMapServerLegendInfos getLegendInfo2(IMapDescription pMapDescription, IImageDisplay pImageDisplay, ILongArray layerIds, IMapServerLegendPatch patch, IImageType imgType)
          Returns a collection of Map Server Legend Info objects for the specified layers.
 int getMapCount()
          The number of maps (data frames) in the document.
 String getMapName(int index)
          Name of the map (data frame) as indicated by the index.
 IMapTableSubtypeInfos getMapTableSubtypeInfos(String mapName, ILongArray pTableIDs)
          Returns the MapTableSubtypeInfos in the current map.
 IMapTableSubtypeInfos getMapTableSubtypeInfos2(String mapName, ILayerDescriptions pLayers)
          Returns the MapTableSubtypeInfos in the current map.
 IMapServerInfo getServerInfo(String mapName)
          Returns information about a map (data frame).
 IPropertySet getServiceConfigurationInfo()
          A set of name-value pairs for properties set for the MapServer Service Configuration Restrictions.
 ISQLSyntaxInfo getSQLSyntaxInfo(String mapName, int layerID)
          Returns the SQL syntax information for the specified layer.
 int getSupportedImageReturnTypes()
          The supported image return types for the map server.
 IMapServerIdentifyResults identify(IMapDescription mapDesc, IImageDisplay mapImage, IGeometry searchShape, int tolerance, int option, ILongArray layerIds)
          Returns a collection of Map Server Identify Result objects at the given location.
 IAttachmentDataArray queryAttachmentData(String mapName, int tableID, ILongArray attachmentIDs, int transportType)
          Returns the attachment data for the given features/ rows.
 IAttachmentDataArray queryAttachmentData2(String mapName, IMapTableDescription pTableDescription, ILongArray attachmentIDs, int transportType)
          Returns the attachment data for the given features/ rows.
 IAttachmentInfoArray queryAttachmentInfos(String mapName, int tableID, ILongArray rowIDs)
          Returns the attachment info that describe the attachments for the given features/ rows.
 IAttachmentInfoArray queryAttachmentInfos2(String mapName, IMapTableDescription pTableDescription, ILongArray rowIDs)
          Returns the attachment info that describe the attachments for the given features/ rows.
 IQueryResult queryData(String mapName, IMapTableDescription pMapTableDescription, IQueryFilter filter, IQueryResultOptions options)
          Returns a record set of rows that meet the query filter selection criteria for the specified table.
 IRecordSet queryDataStatistics(String mapName, IMapTableDescription pTableDescription, IStatisticsRequest pRequest, IQueryFilter pQueryFilter)
          Calculates aggregate statistics for one or more fields on a table or layer.
 int queryFeatureCount(String mapName, int layerID, IQueryFilter filter)
          Returns the count of the features that meet the query filter selection criteria for the specified layer.
 int queryFeatureCount2(String mapName, ILayerDescription pLayerDescription, IQueryFilter filter)
          Returns the count of the features that meet the query filter selection criteria for the specified layer.
 IRecordSet queryFeatureData(String mapName, int layerID, IQueryFilter filter)
          Returns a record set of features that meet the query filter selection criteria for the specified layer.
 IQueryResult queryFeatureData2(String mapName, ILayerDescription pLayerDesciscription, IQueryFilter filter, IQueryResultOptions options)
          Returns a record set of features that meet the query filter selection criteria for the specified layer.
 IFIDSet queryFeatureIDs(String mapName, int layerID, IQueryFilter filter)
          Returns the IDs of the features that meet the query filter selection criteria for the specified layer.
 IFIDSet queryFeatureIDs2(String mapName, ILayerDescription pLayerDesciscription, IQueryFilter filter)
          Returns the IDs of the features that meet the query filter selection criteria for the specified layer.
 IStringArray queryHTMLPopups(String mapName, int tableID, ILongArray pRowIDs)
          Returns the html as text that can be used in popups.
 IStringArray queryHTMLPopups2(String mapName, IMapTableDescription pTableDescription, ILongArray pRowIDs)
          Returns the html as text that can be used in popups.
 IMapServerHyperlinks queryHyperlinks(IMapDescription mapDesc, IImageDisplay mapImage, ILongArray layerIds)
          Returns a collection of Map Server Hyperlink objects for the specified layers.
 IImageResults queryRasterValue(String mapName, int sourceTableID, ILongArray rowIDs, String fieldName, IImageType rasterValueType)
          Returns the Raster content that meet the selection criteria for the specified table.
 IImageResults queryRasterValue2(String mapName, IMapTableDescription pTableDescription, ILongArray rowIDs, String fieldName, IImageType rasterValueType)
          Returns the Raster content that meet the selection criteria for the specified dynamic layer.
 IQueryResult queryRelatedRecords(String mapName, int sourceTable, IFIDSet pFIDs, IRelateDescription relateDescription)
          Returns the IDs of the rows that meet the query filter selection criteria for the specified table.
 IQueryResult queryRelatedRecords2(String mapName, IMapTableDescription pTableDescription, IFIDSet pFIDs, IRelateDescription relateDescription)
          Returns the IDs of the rows that meet the query filter selection criteria for the specified dynamic layer.
 int queryRowCount(String mapName, IMapTableDescription pTableDescription, IQueryFilter pFilter)
          Returns the count of the rows that meet the query filter selection criteria for the specified table.
 ILongArray queryRowIDs(String mapName, IMapTableDescription pTableDescription, IQueryFilter pFilter)
          Returns the IDs of the rows that meet the query filter selection criteria for the specified table.
 IPointCollection toMapPoints(IMapDescription mapDescription, IImageDisplay mapDisplay, ILongArray screenXValues, ILongArray screenYValues)
          Converts a screen location to a map coordinate.
 

Method Detail

generateDataClasses

IFeatureRenderer generateDataClasses(String mapName,
                                     IMapTableDescription pTableDescription,
                                     IDataClassificationDef pDataClassificationDef)
                                     throws IOException,
                                            AutomationException
Returns the class breaks or unique values for the specified dynamic layer.

Remarks

GenerateDataClasses is a helper function that allows clients to generate classes based on a classification method or get distinct values from single or multiple fields. This eliminates the need to download entire dataset on the client side to compute class breaks or find out distint values from a field. Since the result is a IFeatureRenderer, the result is primarily used to change the renderer of a layer without needing to access fine grained ArcObjects or restarting a mapservice by simply making coarse grain MapServer function call. Please check IMapServer::ExportMapImage function help for more information on this.

The type of renderer that is returned by this function depends on DataClassificationDef parameter - for example, if an object of type IClassBreakDef is passed in, the result will be a ClassBreaksRenderer, of if IUniqueValuesDef is passed in you will get back a UniqueValueRenderer object.

Please note that when this function is called with a standalone table as an input parameter, it does not return symbol for each class in the returned IFeatureRenderer unless IDataClassificationDef::BaseSymbol is specified.

You can control the returned symbols in the result by specifying BaseSymbol and/or ColorRamp. If these are not specified, the function returns symbol with default values in case the input is a layer. The default ColorRamp is "Green to Blue". The color of returned symbol is always RgbColor.

This function honors the definition expression set on the queried table or layer.

For performance reason, you should always run this on a base table or layer instead of joined table or table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pDataClassificationDef - A reference to a com.esri.arcgis.carto.IDataClassificationDef (in)
Returns:
A reference to a com.esri.arcgis.carto.IFeatureRenderer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRelatedRecords2

IQueryResult queryRelatedRecords2(String mapName,
                                  IMapTableDescription pTableDescription,
                                  IFIDSet pFIDs,
                                  IRelateDescription relateDescription)
                                  throws IOException,
                                         AutomationException
Returns the IDs of the rows that meet the query filter selection criteria for the specified dynamic layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pFIDs - A reference to a com.esri.arcgis.geodatabase.IFIDSet (in)
relateDescription - A reference to a com.esri.arcgis.carto.IRelateDescription (in)
Returns:
A reference to a com.esri.arcgis.carto.IQueryResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRasterValue2

IImageResults queryRasterValue2(String mapName,
                                IMapTableDescription pTableDescription,
                                ILongArray rowIDs,
                                String fieldName,
                                IImageType rasterValueType)
                                throws IOException,
                                       AutomationException
Returns the Raster content that meet the selection criteria for the specified dynamic layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
rowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
fieldName - The fieldName (in)
rasterValueType - A reference to a com.esri.arcgis.carto.IImageType (in)
Returns:
A reference to a com.esri.arcgis.carto.IImageResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryAttachmentInfos2

IAttachmentInfoArray queryAttachmentInfos2(String mapName,
                                           IMapTableDescription pTableDescription,
                                           ILongArray rowIDs)
                                           throws IOException,
                                                  AutomationException
Returns the attachment info that describe the attachments for the given features/ rows.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
rowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IAttachmentInfoArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryAttachmentData2

IAttachmentDataArray queryAttachmentData2(String mapName,
                                          IMapTableDescription pTableDescription,
                                          ILongArray attachmentIDs,
                                          int transportType)
                                          throws IOException,
                                                 AutomationException
Returns the attachment data for the given features/ rows.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
attachmentIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
transportType - A com.esri.arcgis.system.esriTransportType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IAttachmentDataArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryHTMLPopups2

IStringArray queryHTMLPopups2(String mapName,
                              IMapTableDescription pTableDescription,
                              ILongArray pRowIDs)
                              throws IOException,
                                     AutomationException
Returns the html as text that can be used in popups.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pRowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapTableSubtypeInfos2

IMapTableSubtypeInfos getMapTableSubtypeInfos2(String mapName,
                                               ILayerDescriptions pLayers)
                                               throws IOException,
                                                      AutomationException
Returns the MapTableSubtypeInfos in the current map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pLayers - A reference to a com.esri.arcgis.carto.ILayerDescriptions (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapTableSubtypeInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryDataStatistics

IRecordSet queryDataStatistics(String mapName,
                               IMapTableDescription pTableDescription,
                               IStatisticsRequest pRequest,
                               IQueryFilter pQueryFilter)
                               throws IOException,
                                      AutomationException
Calculates aggregate statistics for one or more fields on a table or layer.

Remarks

QueryDataStatistics returns a recordset with requested statistics optionally grouped by or/and ordered by field(s) from a layer or a table. Use IStatisticsRequest to define what type of statistical information you would like to get back and how you want result be presented (e.g. sorted differently or result grouped by values from another field).

Please note that you must check IMapTableInfo2::SupportsStatistics before calling this function since not all layer type or source database supports this functionality.

This function honors defintion expression set to the layer or table. If you need to statistics from a set of features/rows that meet a criterion, then you can use IQueryFilter::WhereClause and pass this as a parameter to this function. When QueryFilter parameter is null, all features/rows are used (if defintion expression is not set) to compute statistics.

When IStatisticDescription::ResultFieldName is not specified, an auto-generated field name will be used.

Results:

If IStatisticRequest::GroupByFields is specified, statistics will be calculated separately for each unique attribute value. The output record will contain only one record if no GroupByFields is specified. If one is specified, there will be one record for each GroupByFields value.

Limitations:

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pRequest - A reference to a com.esri.arcgis.carto.IStatisticsRequest (in)
pQueryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryData

IQueryResult queryData(String mapName,
                       IMapTableDescription pMapTableDescription,
                       IQueryFilter filter,
                       IQueryResultOptions options)
                       throws IOException,
                              AutomationException
Returns a record set of rows that meet the query filter selection criteria for the specified table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pMapTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
options - A reference to a com.esri.arcgis.carto.IQueryResultOptions (in)
Returns:
A reference to a com.esri.arcgis.carto.IQueryResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRowCount

int queryRowCount(String mapName,
                  IMapTableDescription pTableDescription,
                  IQueryFilter pFilter)
                  throws IOException,
                         AutomationException
Returns the count of the rows that meet the query filter selection criteria for the specified table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
The pCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRowIDs

ILongArray queryRowIDs(String mapName,
                       IMapTableDescription pTableDescription,
                       IQueryFilter pFilter)
                       throws IOException,
                              AutomationException
Returns the IDs of the rows that meet the query filter selection criteria for the specified table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableDescription - A reference to a com.esri.arcgis.carto.IMapTableDescription (in)
pFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
A reference to a com.esri.arcgis.system.ILongArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRelatedRecords

IQueryResult queryRelatedRecords(String mapName,
                                 int sourceTable,
                                 IFIDSet pFIDs,
                                 IRelateDescription relateDescription)
                                 throws IOException,
                                        AutomationException
Returns the IDs of the rows that meet the query filter selection criteria for the specified table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
sourceTable - The sourceTable (in)
pFIDs - A reference to a com.esri.arcgis.geodatabase.IFIDSet (in)
relateDescription - A reference to a com.esri.arcgis.carto.IRelateDescription (in)
Returns:
A reference to a com.esri.arcgis.carto.IQueryResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryRasterValue

IImageResults queryRasterValue(String mapName,
                               int sourceTableID,
                               ILongArray rowIDs,
                               String fieldName,
                               IImageType rasterValueType)
                               throws IOException,
                                      AutomationException
Returns the Raster content that meet the selection criteria for the specified table.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
sourceTableID - The sourceTableID (in)
rowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
fieldName - The fieldName (in)
rasterValueType - A reference to a com.esri.arcgis.carto.IImageType (in)
Returns:
A reference to a com.esri.arcgis.carto.IImageResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryAttachmentInfos

IAttachmentInfoArray queryAttachmentInfos(String mapName,
                                          int tableID,
                                          ILongArray rowIDs)
                                          throws IOException,
                                                 AutomationException
Returns the attachment info that describe the attachments for the given features/ rows.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
tableID - The tableID (in)
rowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IAttachmentInfoArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryAttachmentData

IAttachmentDataArray queryAttachmentData(String mapName,
                                         int tableID,
                                         ILongArray attachmentIDs,
                                         int transportType)
                                         throws IOException,
                                                AutomationException
Returns the attachment data for the given features/ rows.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
tableID - The tableID (in)
attachmentIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
transportType - A com.esri.arcgis.system.esriTransportType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IAttachmentDataArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryHTMLPopups

IStringArray queryHTMLPopups(String mapName,
                             int tableID,
                             ILongArray pRowIDs)
                             throws IOException,
                                    AutomationException
Returns the html as text that can be used in popups.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
tableID - The tableID (in)
pRowIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultLayerDrawingDescriptions

ILayerDrawingDescriptions getDefaultLayerDrawingDescriptions(String mapName,
                                                             ILongArray pLayerIDs,
                                                             IServerSymbolOutputOptions outputOptions)
                                                             throws IOException,
                                                                    AutomationException
Get Layer Drawing Description

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pLayerIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
outputOptions - A reference to a com.esri.arcgis.carto.IServerSymbolOutputOptions (in)
Returns:
A reference to a com.esri.arcgis.carto.ILayerDrawingDescriptions
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapTableSubtypeInfos

IMapTableSubtypeInfos getMapTableSubtypeInfos(String mapName,
                                              ILongArray pTableIDs)
                                              throws IOException,
                                                     AutomationException
Returns the MapTableSubtypeInfos in the current map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pTableIDs - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapTableSubtypeInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocumentInfo

IPropertySet getDocumentInfo()
                             throws IOException,
                                    AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapCount

int getMapCount()
                throws IOException,
                       AutomationException
The number of maps (data frames) in the document.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapName

String getMapName(int index)
                  throws IOException,
                         AutomationException
Name of the map (data frame) as indicated by the index. The first beginning with 0.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
The mapName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultMapName

String getDefaultMapName()
                         throws IOException,
                                AutomationException
Name of the document's active map (data frame).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The mapName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getServerInfo

IMapServerInfo getServerInfo(String mapName)
                             throws IOException,
                                    AutomationException
Returns information about a map (data frame).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportMapImage

IMapImage exportMapImage(IMapDescription mapDesc,
                         IImageDescription imageDesc)
                         throws IOException,
                                AutomationException
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'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
imageDesc - A reference to a com.esri.arcgis.carto.IImageDescription (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapImage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

find

IMapServerFindResults find(IMapDescription mapDesc,
                           IImageDisplay mapImage,
                           String searchString,
                           boolean contains,
                           String searchFields,
                           int option,
                           ILongArray layerIds)
                           throws IOException,
                                  AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapImage - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
searchString - The searchString (in)
contains - The contains (in)
searchFields - The searchFields (in)
option - A com.esri.arcgis.carto.esriFindOption constant (in)
layerIds - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerFindResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

identify

IMapServerIdentifyResults identify(IMapDescription mapDesc,
                                   IImageDisplay mapImage,
                                   IGeometry searchShape,
                                   int tolerance,
                                   int option,
                                   ILongArray layerIds)
                                   throws IOException,
                                          AutomationException
Returns a collection of Map Server Identify Result objects at the given location. If LayerIDs is Nothing/Null or empty, all layers are searched.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapImage - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
searchShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
tolerance - The tolerance (in)
option - A com.esri.arcgis.carto.esriIdentifyOption constant (in)
layerIds - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerIdentifyResults
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureCount

int queryFeatureCount(String mapName,
                      int layerID,
                      IQueryFilter filter)
                      throws IOException,
                             AutomationException
Returns the count of the features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
layerID - The layerID (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureIDs

IFIDSet queryFeatureIDs(String mapName,
                        int layerID,
                        IQueryFilter filter)
                        throws IOException,
                               AutomationException
Returns the IDs of the features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
layerID - The layerID (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFIDSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureData

IRecordSet queryFeatureData(String mapName,
                            int layerID,
                            IQueryFilter filter)
                            throws IOException,
                                   AutomationException
Returns a record set of features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
layerID - The layerID (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryHyperlinks

IMapServerHyperlinks queryHyperlinks(IMapDescription mapDesc,
                                     IImageDisplay mapImage,
                                     ILongArray layerIds)
                                     throws IOException,
                                            AutomationException
Returns a collection of Map Server Hyperlink objects for the specified layers. Only hyperlinks of visible layers are returned. If LayerIDs is Nothing/Null or empty, all layers are searched.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapImage - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
layerIds - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerHyperlinks
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

computeScale

double computeScale(IMapDescription mapDesc,
                    IImageDisplay mapDisplay)
                    throws IOException,
                           AutomationException
Computes the scale of the specified map, at the given map extent, for an image with the given size.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
Returns:
The scale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

computeDistance

double computeDistance(String mapName,
                       IPoint fromPoint,
                       IPoint toPoint,
                       int units)
                       throws IOException,
                              AutomationException
Computes the distance between two points on the specified map. The result is in the map units of the specified map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
fromPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
toPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
units - A com.esri.arcgis.system.esriUnits constant (in)
Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

toMapPoints

IPointCollection toMapPoints(IMapDescription mapDescription,
                             IImageDisplay mapDisplay,
                             ILongArray screenXValues,
                             ILongArray screenYValues)
                             throws IOException,
                                    AutomationException
Converts a screen location to a map coordinate.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDescription - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
screenXValues - A reference to a com.esri.arcgis.system.ILongArray (in)
screenYValues - A reference to a com.esri.arcgis.system.ILongArray (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPointCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fromMapPoints

void fromMapPoints(IMapDescription mapDescription,
                   IImageDisplay mapDisplay,
                   IPointCollection mapPoints,
                   ILongArray[] screenXValues,
                   ILongArray[] screenYValues)
                   throws IOException,
                          AutomationException
Converts a map coordinate to a screen location.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapDescription - A reference to a com.esri.arcgis.carto.IMapDescription (in)
mapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
mapPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
screenXValues - A reference to a com.esri.arcgis.system.ILongArray (in/out: use single element array)
screenYValues - A reference to a com.esri.arcgis.system.ILongArray (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLegendInfo

IMapServerLegendInfos getLegendInfo(String mapName,
                                    ILongArray layerIds,
                                    IMapServerLegendPatch patch,
                                    IImageType imgType)
                                    throws IOException,
                                           AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
layerIds - A reference to a com.esri.arcgis.system.ILongArray (in)
patch - A reference to a com.esri.arcgis.carto.IMapServerLegendPatch (in)
imgType - A reference to a com.esri.arcgis.carto.IImageType (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerLegendInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSQLSyntaxInfo

ISQLSyntaxInfo getSQLSyntaxInfo(String mapName,
                                int layerID)
                                throws IOException,
                                       AutomationException
Returns the SQL syntax information for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
layerID - The layerID (in)
Returns:
A reference to a com.esri.arcgis.carto.ISQLSyntaxInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSupportedImageReturnTypes

int getSupportedImageReturnTypes()
                                 throws IOException,
                                        AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.carto.esriImageReturnType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportScaleBar

IImageResult exportScaleBar(IScaleBar scalebar,
                            IMapDescription mapDesc,
                            IImageDisplay pMapDisplay,
                            IColor backgroundColor,
                            IImageDescription imageDesc)
                            throws IOException,
                                   AutomationException
Exports a scale bar to an image file. The client can create the scaleBar object and set its desired properties appropriately. If scaleBar is Nothing/Null, a default scale bar will be generated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
scalebar - A reference to a com.esri.arcgis.carto.IScaleBar (in)
mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)
pMapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
backgroundColor - A reference to a com.esri.arcgis.display.IColor (in)
imageDesc - A reference to a com.esri.arcgis.carto.IImageDescription (in)
Returns:
A reference to a com.esri.arcgis.carto.IImageResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureCount2

int queryFeatureCount2(String mapName,
                       ILayerDescription pLayerDescription,
                       IQueryFilter filter)
                       throws IOException,
                              AutomationException
Returns the count of the features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pLayerDescription - A reference to a com.esri.arcgis.carto.ILayerDescription (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureIDs2

IFIDSet queryFeatureIDs2(String mapName,
                         ILayerDescription pLayerDesciscription,
                         IQueryFilter filter)
                         throws IOException,
                                AutomationException
Returns the IDs of the features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pLayerDesciscription - A reference to a com.esri.arcgis.carto.ILayerDescription (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFIDSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFeatureData2

IQueryResult queryFeatureData2(String mapName,
                               ILayerDescription pLayerDesciscription,
                               IQueryFilter filter,
                               IQueryResultOptions options)
                               throws IOException,
                                      AutomationException
Returns a record set of features that meet the query filter selection criteria for the specified layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
mapName - The mapName (in)
pLayerDesciscription - A reference to a com.esri.arcgis.carto.ILayerDescription (in)
filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
options - A reference to a com.esri.arcgis.carto.IQueryResultOptions (in)
Returns:
A reference to a com.esri.arcgis.carto.IQueryResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getServiceConfigurationInfo

IPropertySet getServiceConfigurationInfo()
                                         throws IOException,
                                                AutomationException
A set of name-value pairs for properties set for the MapServer Service Configuration Restrictions.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLegendInfo2

IMapServerLegendInfos getLegendInfo2(IMapDescription pMapDescription,
                                     IImageDisplay pImageDisplay,
                                     ILongArray layerIds,
                                     IMapServerLegendPatch patch,
                                     IImageType imgType)
                                     throws IOException,
                                            AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pMapDescription - A reference to a com.esri.arcgis.carto.IMapDescription (in)
pImageDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
layerIds - A reference to a com.esri.arcgis.system.ILongArray (in)
patch - A reference to a com.esri.arcgis.carto.IMapServerLegendPatch (in)
imgType - A reference to a com.esri.arcgis.carto.IImageType (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapServerLegendInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.