|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.arcgis.carto.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.
MapServer is a coarse-grained ArcObject. This object allows users to display and query ArcGIS map documents in either desktop, LAN/WAN, or internet development environments. In the desktop environment you can use MapServer, as well as other coarse-grained objects as a "short-cut" for ArcObjects development. Operations that took many lines of code may now just take a few. In a server environment, MapServer objects can be accessed via Distributed COM (DCOM) over a TCP/IP connection (Intranet) or via SOAP/XML over an HTTP connection (Internet).
The MapServer coclass contains several interfaces with basic functions for displaying (IMapServer and IMapServerLayout) and querying (IMapServer and IMapServerData) an ArcGIS map document (.mxd or .pmf).
In addition to MapServer, a number of MapServer objects are defined to represent input and output parameters for methods on MapServer interfaces. For example, the IMapServer method ExportMapImage requires two inputs: a description of the map to be exported and a description of the output parameters. These inputs are captured in the MapDescription and ImageDescription objects.
Though the methods and properties available through MapServer and its associated objects offer important mapping functionality, they cannot possibly encapsulate all that ArcObjects offers. In many cases you may want to use other, finer-grained, ArcObjects in conjunction with MapServer. You can do this using the IMapServerObjects interface. Through this interface you can access ILayer, IMap and IPageLayout. For example, you can make changes to the map, such as adding a new layer, using IMap.
It is very important to distinguish between temporary and permanent changes to the MapServer object. A temporary change would include changes to the MapDescription or LayerDescription using IMapDescription and ILayerDescription. For example, you might change the geographic extent of a map (MapArea) or change the visibility of a layer (Visible). These changes can be temporary and valid for the duration of the call. Once the call has ended the MapServer object returns to it's default state.
Permanent changes to the MapServer object can be done in two ways. The first is by changing MapServer properties using such interfaces as IMapDescription and ILayerDescription and then calling the IMapServerObjects method ApplyMapDescription. This will update the state of the fine-grained ArcObjects. Another way to change the MapServer object is to access the underlaying fine-grained ArcObjects directly using the methods on IMapServerObjects, make a change such as adding a new layer or changing a layer's rendering, and then calling RefreshServerObjects. This refreshes the MapServer object with the current state held by the fine-grained ArcObjects.
You should use non-pooled objects when permently changing the state of fine-grained ArcObjects.
Only certain symbols are supported when working with the MapServer WSDL or accessing a MapServer object through an AGSServerConnection (LAN or internet). These include ISimpleMarkerSymbol, ICharacterMarker, IPictureMarker, ISimpleLineSymbol, ISimpleFillSymbol and IPictureFill.
A MapServer service can have an associated tiled map cache. This cache is a collection of pre-rendered map tiles that are used for the display of the map service. A cache can either be a fused cache where all layers within the map service are cached or a Multi-layer cache where only select map layers are cached. Working with MapServer and a cached map service can be different than working with a map service without a cache. Though you will be able to query against a cached map service just as you would a non-cached map service, you will see differences when working with cached map service's MapDescription and the LayerDescription of any map layer belonging to a cache.
If the map service has a fused cache custom graphics, including the rendering of selected features, cannot be applied to the MapDescription. In addition, any changes made to the LayerDescription of any of the map layers, such as applying a definition expression, applying a selection buffer, toggling the visibility of labels or changing the visibility of the layer itself are ignored. When the map service has a Multi-layer cache changes to the MapDescription are honored. You will be able to render custom graphics and selection features, including features belonging to cached layers. However, you will not be able to apply a definition expression to or toggle the value of the ScaleSymbol property of individual layers that are cached. These will be ignored. Finally, applying a new spatial reference on cached map services though IMapDescription will not work. The cached layers will not draw. You will need to use ITileCacheInfo to change the spatial reference.
| Constructor Summary | |
MapServer()
Constructs a MapServer using ArcGIS Engine. |
|
MapServer(java.lang.Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
| Method Summary | |
void |
activate()
Activates the object. |
void |
applyMapDescription(IMapDescription mapDescription,
IImageDisplay mapDisplay)
Applies the current state of the map description to the map server object. |
double |
computeDistance(java.lang.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. |
void |
connect(java.lang.String filePath)
Initializes the map server with an mxd or pmf file stored at the specified path. |
void |
construct(IPropertySet props)
Two phase object construction. |
void |
deactivate()
Deactivates the object. |
boolean |
equals(java.lang.Object o)
Compare this object with another |
ILayoutImage |
exportLayout(IPageDescription pageDesc,
IImageDescription imageDesc)
Generates an image of the layout, based on the given page description object, and writes the image to a specified file on disk. |
IImageResult |
exportLegend(ILegend legend,
IMapDescription mapDesc,
IImageDisplay pMapDisplay,
IColor backgroundColor,
IImageDescription imageDesc)
Exports a legend to an image file. |
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 |
exportNorthArrow(INorthArrow arrow,
IMapDescription mapDesc,
IColor backgroundColor,
IImageDescription imageDesc)
Exports a north arrow to an image file. |
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,
java.lang.String searchString,
boolean contains,
java.lang.String searchFields,
int option,
ILongArray layerIds)
Returns a collection of Map Server Find Result objects that contain the given search string. |
IServerObjectExtension |
findExtensionByCLSID(java.lang.String cLSID)
Returns a server object extension found using a string representation of its class ID. |
IServerObjectExtension |
findExtensionByTypeName(java.lang.String name)
Returns a server object extension found using its type name. |
void |
fromMapPoints(IMapDescription mapDescription,
IImageDisplay mapDisplay,
IPointCollection mapPoints,
ILongArray[] screenXValues,
ILongArray[] screenYValues)
Converts a map coordinate to a screen location. |
void |
fromPagePoints(IEnvelope pageExtent,
IImageDisplay pageDisplay,
IPointCollection pagePoints,
ILongArray[] screenXValues,
ILongArray[] screenYValues)
Converts a page coordinate to a screen location. |
ILogSupport |
getAsILogSupport()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServer |
getAsIMapServer()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerData |
getAsIMapServerData()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerInit |
getAsIMapServerInit()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerInit2 |
getAsIMapServerInit2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerLayout |
getAsIMapServerLayout()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerObjects |
getAsIMapServerObjects()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IMapServerObjects2 |
getAsIMapServerObjects2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IObjectActivate |
getAsIObjectActivate()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IObjectConstruct |
getAsIObjectConstruct()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IRequestHandler |
getAsIRequestHandler()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IRequestHandler2 |
getAsIRequestHandler2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IServerObject |
getAsIServerObject()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IServerObjectExtensionManager |
getAsIServerObjectExtensionManager()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
ISupportErrorInfo |
getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
ITiledMapServer |
getAsITiledMapServer()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
java.lang.String |
getCacheName(java.lang.String mapName,
int layerID)
Gets the cache name for a given layer within a map. |
static java.lang.String |
getClsid()
|
java.lang.String |
getConfigurationName()
Name of the server object configuration that defines the server object. |
java.lang.String |
getDefaultMapName()
Name of the document's active map (data frame). |
IPageDescription |
getDefaultPageDescription()
The default page settings. |
IPropertySet |
getDocumentInfo()
A set of name-value pairs for properties set for the map document (mxd only). |
IFeature |
getFeature(java.lang.String mapName,
int layerID,
int featureId)
Returns a feature, given the feature ID and layer. |
java.lang.String |
getFeatureValue(java.lang.String mapName,
int layerID,
IFeature feature,
java.lang.String fieldName)
Returns the value of a given feature as a string. |
java.lang.String |
getFilePath()
The map document path. |
ILayer |
getLayer(java.lang.String mapName,
int layerID)
The layer specified by the map name and layer ID. |
int |
getLayerID(java.lang.String mapName,
ILayer pLayer)
The layer specified by the map name and layer ID. |
byte[] |
getLayerTile(java.lang.String mapName,
int layerID,
int level,
int row,
int column)
Gets a tile for a given tile location from a given layer. |
IMapServerLegendInfos |
getLegendInfo(java.lang.String mapName,
ILongArray layerIds,
IMapServerLegendPatch patch,
IImageType imgType)
Returns a collection of Map Server Legend Info objects for the specified layers. |
IMap |
getMap(java.lang.String mapName)
The map corresponding to the specified map name. |
int |
getMapCount()
The number of maps (data frames) in the document. |
java.lang.String |
getMapName(int index)
Name of the map (data frame) as indicated by the index. |
byte[] |
getMapTile(java.lang.String mapName,
int level,
int row,
int column)
Gets a tile for a given tile location from a given map. |
int |
getMaxBufferCount()
The maximum number of records buffered on the server for display. |
int |
getMaxImageHeight()
The maximum height in pixels of an image request. |
int |
getMaxImageWidth()
The maximum width in pixels of an image request. |
int |
getMaxRecordCount()
The maximum number of records returned for query results (Identify, Find, QueryFeatureData, and QueryHyperlinks). |
IPageLayout |
getPageLayout()
The page layout object for the current map document. |
java.lang.String |
getPhysicalCacheDirectory()
The physical directory for cache files. |
java.lang.String |
getPhysicalOutputDirectory()
The physical directory for output files. |
IMapServerInfo |
getServerInfo(java.lang.String mapName)
Returns information about a map (data frame). |
java.lang.String |
getSOMCacheDirectory()
The parent directory for cache files. |
java.lang.String |
getSOMVirtualCacheDirectory()
The parent virtual directory for cache files. |
ISQLSyntaxInfo |
getSQLSyntaxInfo(java.lang.String mapName,
int layerID)
Returns the SQL syntax information for the specified layer. |
int |
getSupportedImageReturnTypes()
The supported image return types for the map server. |
Picture |
getThumbnail()
The thumbnail stored in the map document. |
ITileCacheInfo |
getTileCacheInfo(java.lang.String mapName)
Gets the cache configuration for a given map. |
java.lang.String |
getTypeName()
Type of the server object (MapServer or GeocodeServer). |
java.lang.String |
getVirtualCacheDirectory()
The virtual directory for cache files. |
java.lang.String |
getVirtualCacheDirectory(java.lang.String mapName,
int layerID)
Gets the virtual cache directory for a given layer within a map. |
java.lang.String |
getVirtualOutputDirectory()
The virtual directory for output files. |
byte[] |
handleBinaryRequest(byte[] request)
Handles a binary request. |
byte[] |
handleBinaryRequest2(java.lang.String capabilities,
byte[] request)
Handles a binary request with explicit capabilities. |
java.lang.String |
handleStringRequest(java.lang.String capabilities,
java.lang.String request)
Handles a SOAP string request. |
int |
hashCode()
the hashcode for this object |
boolean |
hasLayerCache(java.lang.String mapName,
int layerID)
Indicates if a given layer has a single tile cache. |
boolean |
hasSingleFusedMapCache(java.lang.String mapName)
Indicates if a given map has a single fused map tile cache. |
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. |
void |
initLogging(ILog log)
Initializes an object with a log. |
void |
interfaceSupportsErrorInfo(GUID riid)
Supported Platforms |
boolean |
isFixedScaleMap(java.lang.String mapName)
Indicates if a given map is a fixed scale map. |
int |
queryFeatureCount(java.lang.String mapName,
int layerID,
IQueryFilter filter)
Returns the count of the features that meet the query filter selection criteria for the specified layer. |
IRecordSet |
queryFeatureData(java.lang.String mapName,
int layerID,
IQueryFilter filter)
Returns a record set of features that meet the query filter selection criteria for the specified layer. |
IFIDSet |
queryFeatureIDs(java.lang.String mapName,
int layerID,
IQueryFilter filter)
Returns the IDs of the features that meet the query filter selection criteria for the specified layer. |
IMapServerHyperlinks |
queryHyperlinks(IMapDescription mapDesc,
IImageDisplay mapImage,
ILongArray layerIds)
Returns a collection of Map Server Hyperlink objects for the specified layers. |
void |
refreshServerObjects()
Updates the server info based on the current state of the underlying fine-grained objects. |
void |
setMaxBufferCount(int count)
The maximum number of records buffered on the server for display. |
void |
setMaxImageHeight(int height)
The maximum height in pixels of an image request. |
void |
setMaxImageWidth(int width)
The maximum width in pixels of an image request. |
void |
setMaxRecordCount(int count)
The maximum number of records returned for query results (Identify, Find, QueryFeatureData, and QueryHyperlinks). |
void |
setPhysicalCacheDirectory(java.lang.String pCacheDir)
The physical directory for cache files. |
void |
setPhysicalOutputDirectory(java.lang.String dirPath)
The physical directory for output files. |
void |
setSOMCacheDirectory(java.lang.String pCacheDir)
The parent directory for cache files. |
void |
setVirtualCacheDirectory(java.lang.String pVirtualCacheDir)
The virtual directory for cache files. |
void |
setVirtualOutputDirectory(java.lang.String dirPath)
The virtual directory for output files. |
void |
startWithData(IDataset pDataset)
An alternative to calling Connect(). |
void |
stop()
Clears out all of the map objects in memory. |
IPointCollection |
toMapPoints(IMapDescription mapDescription,
IImageDisplay mapDisplay,
ILongArray screenXValues,
ILongArray screenYValues)
Converts a screen location to a map coordinate. |
IPointCollection |
toPagePoints(IEnvelope pageExtent,
IImageDisplay pageDisplay,
ILongArray screenXValues,
ILongArray screenYValues)
Converts a screen location to a page coordinate. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MapServer()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems
public MapServer(java.lang.Object obj)
throws java.io.IOException
obj to MapServer. MapServer theMapServer = (MapServer) obj;
obj - an object returned from ArcGIS Engine or Server
java.io.IOException - if there are interop problems| Method Detail |
public static java.lang.String getClsid()
public IMapServer getAsIMapServer()
public ITiledMapServer getAsITiledMapServer()
public IObjectConstruct getAsIObjectConstruct()
public IRequestHandler getAsIRequestHandler()
public IRequestHandler2 getAsIRequestHandler2()
public IMapServerObjects getAsIMapServerObjects()
public IMapServerObjects2 getAsIMapServerObjects2()
public IMapServerData getAsIMapServerData()
public IMapServerLayout getAsIMapServerLayout()
public IMapServerInit getAsIMapServerInit()
public IMapServerInit2 getAsIMapServerInit2()
public IObjectActivate getAsIObjectActivate()
public ILogSupport getAsILogSupport()
public ISupportErrorInfo getAsISupportErrorInfo()
public IServerObject getAsIServerObject()
public IServerObjectExtensionManager getAsIServerObjectExtensionManager()
public boolean equals(java.lang.Object o)
public int hashCode()
public IPropertySet getDocumentInfo()
throws java.io.IOException,
AutomationException
IMapServer
getDocumentInfo in interface IMapServerAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getMapCount()
throws java.io.IOException,
AutomationException
IMapServer
getMapCount in interface IMapServerjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getMapName(int index)
throws java.io.IOException,
AutomationException
IMapServerIf 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.
getMapName in interface IMapServerindex - The index (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getDefaultMapName()
throws java.io.IOException,
AutomationException
IMapServerIf 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.
getDefaultMapName in interface IMapServerAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IMapServerInfo getServerInfo(java.lang.String mapName)
throws java.io.IOException,
AutomationException
IMapServerUsing 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.
This method returns an MapServerInfo object.
getServerInfo in interface IMapServermapName - The mapName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMapImage exportMapImage(IMapDescription mapDesc,
IImageDescription imageDesc)
throws java.io.IOException,
AutomationException
IMapServerUse ExportMapImage to generate an image of the map.The input parameter MapDescription contains properties describing the map (data frame). These include the map's Name, the map's MapArea,and SpatialReference, as well as collections of LayerDescription objects. Size, resolution and file format are determined by ImageDescription, which includes ImageDisplay and ImageType.
In order to control the size of an exported map image, the interface IMapServerInit contains two properties: MaxImageHeight and MaxImageWidth. The default value for these properties is 2048 pixels. This value can also be changed by modifying the XML tag in the MapServer's configuration file.
ExportMapImage returns a MapImage object.
exportMapImage in interface IMapServermapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)imageDesc - A reference to a com.esri.arcgis.carto.IImageDescription (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMapServerFindResults find(IMapDescription mapDesc,
IImageDisplay mapImage,
java.lang.String searchString,
boolean contains,
java.lang.String searchFields,
int option,
ILongArray layerIds)
throws java.io.IOException,
AutomationException
IMapServerFind 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 requires a number of input parameters. These include: a map description, an image display (this is needed to determine whether layers are visible or not based on the current map scale), 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.
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.
If the searchFields parameter is blank all fields will be searched.
There are two key differences between Find and the IMapServer methods QueryFeatureCount, QueryFeatureIDs and QueryFeatureData. 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.
Find returns a collection of objects that implement IMapServerFindResult.
In order to control the amount of information MapServer needs to process for a query, a maximum number of records can be set. This value is contained in the MaxRecordCount property on IMapServerInit. The default value for this property is 500. If 600 features match a given query only the first 500 results will be returned. You will be unable to access the remaining 100 records. To be able to access these records the MaxRecordCount would need to be increased to 600. MaxRecordCount affects the following MapServer methods: Find, Identify, QueryFeatureData, and QueryHyperlinks.. It does not affect QueryFeatureCount or QueryFeatureIds. The MaxRecordCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
find in interface IMapServermapDesc - 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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMapServerIdentifyResults identify(IMapDescription mapDesc,
IImageDisplay mapImage,
IGeometry searchShape,
int tolerance,
int option,
ILongArray layerIds)
throws java.io.IOException,
AutomationException
IMapServerIdentify 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.
Identify requires a number of input parameters. These include: a map description, an image display (this is needed to determine whether layers are visible or not based on the current map scale), a search shape (usually a point), a tolerance, the esriIdentifyOption, and an array of layer Ids to be identified.
It is important to note that the geometry of the searchShape must have the same spatial reference as the map description.
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.
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.
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.
In order to control the amount of information MapServer needs to process for a query, a maximum number of records can be set. This value is contained in the MaxRecordCount property on IMapServerInit. The default value for this property is 500. If 600 features match a given query only the first 500 results will be returned. You will be unable to access the remaining 100 records. To be able to access these records the MaxRecordCount would need to be increased to 600. MaxRecordCount affects the following MapServer methods: Find, Identify, QueryFeatureData, and QueryHyperlinks.. It does not affect QueryFeatureCount or QueryFeatureIds. The MaxRecordCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
This method returns a collection of objects that implement IMapServerIdentifyResult.
identify in interface IMapServermapDesc - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int queryFeatureCount(java.lang.String mapName,
int layerID,
IQueryFilter filter)
throws java.io.IOException,
AutomationException
IMapServerThe query filter can be based on either an attribute filter (SQL expression) or a spatial filter. The expression used in the filter parameter of either QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData methods on MapServer will override any filters set for the layer in the original map document (layer definition query) or set for the MapServer object layer in the DefinitionQuery property on LayerDescription. In order to apply previous query filters to the new filter set by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData the original query expression will need to be appended to the new expression to form one compounded query expression. This compound expression can then be used by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData.
queryFeatureCount in interface IMapServermapName - The mapName (in)layerID - The layerID (in)filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IFIDSet queryFeatureIDs(java.lang.String mapName,
int layerID,
IQueryFilter filter)
throws java.io.IOException,
AutomationException
IMapServerThe query filter can be based on either an attribute filter (SQL expression) or a spatial filter. The expression used in the filter parameter of either QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData methods on MapServer will override any filters set for the layer in the original map document (layer definition query) or set for the MapServer object layer in the DefinitionQuery property on LayerDescription . In order to apply previous query filters to the new filter set by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData the original query expression will need to be appended to the new expression to form one compounded query expression. This compound expression can then be used by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData.
queryFeatureIDs in interface IMapServermapName - The mapName (in)layerID - The layerID (in)filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IRecordSet queryFeatureData(java.lang.String mapName,
int layerID,
IQueryFilter filter)
throws java.io.IOException,
AutomationException
IMapServerThe query filter can be based on either an attribute filter (SQL expression) or on a spatial filter. In order to control the amount of information MapServer needs to process for a query, a maximum number of records can be set. This value is contained in the MaxRecordCount property on IMapServerInit. The default value for this property is 500. If 600 features match a given query only the first 500 results will be returned. You will be unable to access the remaining 100 records. To be able to access these records the MaxRecordCount would need to be increased to 600. MaxRecordCount affects the following IMapServer methods: Find, Identify, QueryFeatureData, and QueryHyperlinks. It does not affect QueryFeatureCount or QueryFeatureIDs. The MaxRecordCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
The expression used in the filter parameter of either QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData methods on MapServer will override any filters set for the layer in the original map document (layer definition query) or set for the MapServer object layer in the DefinitionQuery property on LayerDescription . In order to apply previous query filters to the new filter set by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData the original query expression will need to be appended to the new expression to form one compounded query expression. This compound expression can then be used by QueryFeatureCount, QueryFeatureIDs, or QueryFeatureData.
queryFeatureData in interface IMapServermapName - The mapName (in)layerID - The layerID (in)filter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMapServerHyperlinks queryHyperlinks(IMapDescription mapDesc,
IImageDisplay mapImage,
ILongArray layerIds)
throws java.io.IOException,
AutomationException
IMapServerLayer 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.
In order to control the amount of information MapServer needs to process for a query, a maximum number of records can be set. This value is contained in the MaxRecordCount property on IMapServerInit. The default value for this property is 500. If 600 features match a given query only the first 500 results will be returned. You will be unable to access the remaining 100 records. To be able to access these records the MaxRecordCount would need to be increased to 600. MaxRecordCount affects the following IMapServer methods: Find, Identify, QueryFeatureData, and QueryHyperlinks. It does not affect QueryFeatureCount or QueryFeatureIDs. The MaxRecordCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
This method returns a collection of objects that implement IMapServerHyperlink.
queryHyperlinks in interface IMapServermapDesc - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public double computeScale(IMapDescription mapDesc,
IImageDisplay mapDisplay)
throws java.io.IOException,
AutomationException
IMapServer
computeScale in interface IMapServermapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)mapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public double computeDistance(java.lang.String mapName,
IPoint fromPoint,
IPoint toPoint,
int units)
throws java.io.IOException,
AutomationException
IMapServer
computeDistance in interface IMapServermapName - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IPointCollection toMapPoints(IMapDescription mapDescription,
IImageDisplay mapDisplay,
ILongArray screenXValues,
ILongArray screenYValues)
throws java.io.IOException,
AutomationException
IMapServer
toMapPoints in interface IMapServermapDescription - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void fromMapPoints(IMapDescription mapDescription,
IImageDisplay mapDisplay,
IPointCollection mapPoints,
ILongArray[] screenXValues,
ILongArray[] screenYValues)
throws java.io.IOException,
AutomationException
IMapServer
fromMapPoints in interface IMapServermapDescription - 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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMapServerLegendInfos getLegendInfo(java.lang.String mapName,
ILongArray layerIds,
IMapServerLegendPatch patch,
IImageType imgType)
throws java.io.IOException,
AutomationException
IMapServerUse 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.
getLegendInfo in interface IMapServermapName - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public ISQLSyntaxInfo getSQLSyntaxInfo(java.lang.String mapName,
int layerID)
throws java.io.IOException,
AutomationException
IMapServerThe members of the ISQLSyntaxInfo interface provide information regarding the SQL functionality for the DBMS underlying a map layer.
getSQLSyntaxInfo in interface IMapServermapName - The mapName (in)layerID - The layerID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getSupportedImageReturnTypes()
throws java.io.IOException,
AutomationException
IMapServer
getSupportedImageReturnTypes in interface IMapServerjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean isFixedScaleMap(java.lang.String mapName)
throws java.io.IOException,
AutomationException
ITiledMapServer
isFixedScaleMap in interface ITiledMapServermapName - The mapName (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean hasSingleFusedMapCache(java.lang.String mapName)
throws java.io.IOException,
AutomationException
ITiledMapServer
hasSingleFusedMapCache in interface ITiledMapServermapName - The mapName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public ITileCacheInfo getTileCacheInfo(java.lang.String mapName)
throws java.io.IOException,
AutomationException
ITiledMapServer
getTileCacheInfo in interface ITiledMapServermapName - The mapName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public byte[] getMapTile(java.lang.String mapName,
int level,
int row,
int column)
throws java.io.IOException,
AutomationException
ITiledMapServer
getMapTile in interface ITiledMapServermapName - The mapName (in)level - The level (in)row - The row (in)column - The column (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean hasLayerCache(java.lang.String mapName,
int layerID)
throws java.io.IOException,
AutomationException
ITiledMapServer
hasLayerCache in interface ITiledMapServermapName - The mapName (in)layerID - The layerID (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public byte[] getLayerTile(java.lang.String mapName,
int layerID,
int level,
int row,
int column)
throws java.io.IOException,
AutomationException
ITiledMapServer
getLayerTile in interface ITiledMapServermapName - The mapName (in)layerID - The layerID (in)level - The level (in)row - The row (in)column - The column (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getVirtualCacheDirectory(java.lang.String mapName,
int layerID)
throws java.io.IOException,
AutomationException
ITiledMapServer
getVirtualCacheDirectory in interface ITiledMapServermapName - The mapName (in)layerID - The layerID (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String getCacheName(java.lang.String mapName,
int layerID)
throws java.io.IOException,
AutomationException
ITiledMapServer
getCacheName in interface ITiledMapServermapName - The mapName (in)layerID - The layerID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void construct(IPropertySet props)
throws java.io.IOException,
AutomationException
IObjectConstruct
construct in interface IObjectConstructprops - A reference to a com.esri.arcgis.system.IPropertySet (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public byte[] handleBinaryRequest(byte[] request)
throws java.io.IOException,
AutomationException
IRequestHandler
handleBinaryRequest in interface IRequestHandlerrequest - An unsigned byte (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String handleStringRequest(java.lang.String capabilities,
java.lang.String request)
throws java.io.IOException,
AutomationException
IRequestHandler
handleStringRequest in interface IRequestHandlercapabilities - The capabilities (in)request - The request (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public byte[] handleBinaryRequest2(java.lang.String capabilities,
byte[] request)
throws java.io.IOException,
AutomationException
IRequestHandler2
handleBinaryRequest2 in interface IRequestHandler2capabilities - The capabilities (in)request - An unsigned byte (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IMap getMap(java.lang.String mapName)
throws java.io.IOException,
AutomationException
IMapServerObjectsUse Map to access the members of IMap.
getMap in interface IMapServerObjectsmapName - The mapName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public ILayer getLayer(java.lang.String mapName,
int layerID)
throws java.io.IOException,
AutomationException
IMapServerObjectsUse Layer to access the members of ILayer.
getLayer in interface IMapServerObjectsmapName - The mapName (in)layerID - The layerID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IPageLayout getPageLayout()
throws java.io.IOException,
AutomationException
IMapServerObjectsUse PageLayout to access the members of IPageLayout.
getPageLayout in interface IMapServerObjectsjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public Picture getThumbnail()
throws java.io.IOException,
AutomationException
IMapServerObjectsYou cannot access the Thumbnail though DCOM.
getThumbnail in interface IMapServerObjectsAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void refreshServerObjects()
throws java.io.IOException,
AutomationException
IMapServerObjectsUse RefreshServerObjects when you have made changes to the fine-grained ArcObjects and want to apply them to the MapServer object. Keep in mind that this will change the default state of the MapServer object. In order to get the updated MapDescription, you have to call GetServerInfo on IMapServer again.
Any custom graphics (IMapDescription or IPageDescription) set previous to the RefreshServerObjects call will be lost. You will need to repeat the code for the custom graphics.
RefreshServerObjects does not refresh the extent on IPageDescription . Therefore, if you have zoomed to a particular extent of the page layout using the fine-grained ArcObjects (IActiveView) and you want to apply this extent to the PageDescription, you have to do this manually.
refreshServerObjects in interface IMapServerObjectsAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void applyMapDescription(IMapDescription mapDescription,
IImageDisplay mapDisplay)
throws java.io.IOException,
AutomationException
IMapServerObjectsUse ApplyMapDescription to apply changes made in IMapDescription to the map server object. ApplyMapDescription will not apply any custom graphics (IMapDescription or IPageDescription) to the map server object. See the following example on how to apply custom graphics to the map server object.
applyMapDescription in interface IMapServerObjectsmapDescription - A reference to a com.esri.arcgis.carto.IMapDescription (in)mapDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getLayerID(java.lang.String mapName,
ILayer pLayer)
throws java.io.IOException,
AutomationException
IMapServerObjects2
getLayerID in interface IMapServerObjects2mapName - The mapName (in)pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getFeatureValue(java.lang.String mapName,
int layerID,
IFeature feature,
java.lang.String fieldName)
throws java.io.IOException,
AutomationException
IMapServerData
getFeatureValue in interface IMapServerDatamapName - The mapName (in)layerID - The layerID (in)feature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)fieldName - The fieldName (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IFeature getFeature(java.lang.String mapName,
int layerID,
int featureId)
throws java.io.IOException,
AutomationException
IMapServerData
getFeature in interface IMapServerDatamapName - The mapName (in)layerID - The layerID (in)featureId - The featureId (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IPageDescription getDefaultPageDescription()
throws java.io.IOException,
AutomationException
IMapServerLayout
getDefaultPageDescription in interface IMapServerLayoutAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public ILayoutImage exportLayout(IPageDescription pageDesc,
IImageDescription imageDesc)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse ExportLayout to retrieve an image of the map's layout.
PageDescription refers to properties describing the actual map layout. These include the height and width of the layout in page units, the layout page extent in page units, map descriptions for each map frame in the layout and any CustomGraphics to be placed in the layout. Size, resolution and file format are determined by the ImageDescription, which includes ImageDisplay and ImageType.
ExportLayout returns a LayoutImage object. The page extent of the layout, an array of map images (data frames), can be gleaned from this object. In addition, the geographic extent, map scale and an array of visible layers for each data frame in the layout can be retrieved from the MapImage object.
Do not use IMapServerLayout to create new layouts or to create layouts "on-the-fly". You cannot change the actual page size of the map layout, reposition map elements on the layout nor can you add or remove layout elements such as titles, text, graphics, scale bars, north arrows and legends.
Let's look at an example. An existing map layout has a portrait page orientation with a height of 11 inches and a width of 8.5 inches. The absolute scale for the map is 1:30,000,000. This scale is based on the page size of the layout and the relative size of the map's data frame.
To export this layout at the size set in the ArcMap document enter a value of 0 for the height or width properties of IImageDisplay. ImageDisplay is part of the ImageDescription parameter needed for ExportLayout. In this example exporting to a raster format at 96 dpi would result in an image 1056 by 816 pixels.
The size of ExportLayout results can be adjusted using the height and width properties of IImageDisplay. You can increase or decrease the relative size of the map layout. It is important to keep in mind the limitations of doing this. For example, you wish to reduce the image of the 11 by 8.5 layout described above by half. You specify a height of 528 and a width of 408 for the image result. Please note that the map scale does not change. Remember, it is the output size of the image result that is being adjusted. Therefore, the absolute scale of the map will be incorrect, though the scale bar should be correct since its size changes relative to the change in output size. This effect is similar to shrinking or enlarging a printed map using a photocopying machine.
Not specifying a height and width for IImageDisplay, or specifying 0 for both, will cause the export result to maintain the original size of the layout as specified in the map document. The Height and Width properties of IImageResult are read-only and are not used to make changes.
Changing the aspect ratio (height x width) of the ExportLayout output will not change the aspect ratio of the map layout. For example, again using the layout example above, a height of 816 and a width of 1056 pixels are specified. This will not change the orientation of the page layout from portrait to landscape. Instead, the original portrait orientation of the layout will be maintained and will be fitted into the 816 x 1056 space. This will result in white space on either side of the layout.
In order to control the size of an exported image, IMapServerInit contains two properties: MaxImageHeight and MaxImageWidth. The default value for these properties is 1024 pixels.
Another important thing to consider when exporting layouts using IMapServerLayout is to uncheck the "Use Printer Paper Settings" checkbox on the Page and Print Setup dialog in ArcMap. Otherwise, the page setup may be dependent on a printer unavailable to the server or users. This may result in a rescaling of the map and unexpected results.
exportLayout in interface IMapServerLayoutpageDesc - A reference to a com.esri.arcgis.carto.IPageDescription (in)imageDesc - A reference to a com.esri.arcgis.carto.IImageDescription (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IImageResult exportLegend(ILegend legend,
IMapDescription mapDesc,
IImageDisplay pMapDisplay,
IColor backgroundColor,
IImageDescription imageDesc)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse ExportLegend to export a single image representing the map's legend. Use the input parameter ILegend to access the Legend object in order to customize the legend. If the MapDescription parameter is Nothing/Null the default map description is used. Size, resolution and file format are determined by the ImageDescription object, which includes ImageDisplay and ImageType. ExportLegend results in an ImageResult object.
An ExportLegend result displays all visible layers in the map (default).
The default size of a legend is based on the number of layers, symbol size and length of label or description text. This size is likely to vary from map to map.
To best manage the size of the ExportLegend request keep either the width or the height set in ImageDisplay constant. This ImageDisplay object is part of the imageDesc parameter. Don't confuse this ImageDisplay object with the one that refers to the map (MapDisplay).
In order to ensure a constant size do not specify a height and width, or set a value of 0 for each, for the ImageDisplay. However, you can enter your own height or width values. For example, set the ImageDisplay width at 150 and set the height at 0. A setting of 0 will calculate a default value for best fit. The actual height value will adjust as the legend changes to accommodate changes in layer visibility. Depending on the symbols and text you have in youir legend, symbol and text size may not be constant as the number of legend items changes such as when you turn on or off map layers. Make sure to provide an adequate size to the legend to accomodate this. Otherwise, parts of the legend may be cut off or the legend may be illegible. You may need to experiment to find an adequate size. Remember, setting 0 for both the height and width will provide the most consistent and accurate results.
To manage more control over the legend of a MapServer map use the ILegend input parameter or use GetLegendInfo on IMapServer.
exportLegend in interface IMapServerLayoutlegend - A reference to a com.esri.arcgis.carto.ILegend (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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IImageResult exportScaleBar(IScaleBar scalebar,
IMapDescription mapDesc,
IImageDisplay pMapDisplay,
IColor backgroundColor,
IImageDescription imageDesc)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse ExportScaleBar to retrieve the map's scale bar. To customize the scale bar pass in a ScaleBar object. If you pass in Nothing/Null for the input paramter ScaleBar, a default alternating scale bar is drawn. The scale is calculated according to the height and width of the the image (pMapDisplay). This ImageDisplay object refers to the map. Another ImageDisplay object will be used (as part of the imageDesc parameter) that refers to the Scale Bar image. A color background can be set for the ScaleBar swatch by using the backgroundColor parameter. If this is Nothing/Null a white background will be used. Size, resolution and file format are determined by ImageDescription, which includes ImageDisplay and ImageType. ExportScaleBar returns an ImageResult object.
Use the height and width properties of IImageDisplay (as part of the imageDesc parameter) to set the proper size of the scalebar. Entering a 0 for either the height or the width for ExportScaleBar output results in an error.
exportScaleBar in interface IMapServerLayoutscalebar - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IImageResult exportNorthArrow(INorthArrow arrow,
IMapDescription mapDesc,
IColor backgroundColor,
IImageDescription imageDesc)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse ExportNorthArrow to export the map's north arrow. To customize the north arrow (e.g. size) or to change the type of north arrow marker pass in a NorthArrow object. If you pass in Nothing/Null for this input parameter, a standard north arrow is drawn. A color background can be set for the North Arrow swatch by using the backgroundColor parameter. If this is Nothing/Null a white background will be used. Size, resolution and file format are determined by ImageDescription, which includes ImageDisplay and ImageType. ExportNorthArrow results in an ImageResult object.
The orientation of the NorthArrow is determined by the MapRotation property on IMapDescription.
ExportNorthArrow output does not require a size. A default size is calculated based on the size of the NorthArrowMarker symbol. Setting 0 for both the height and the width property of IImageDisplay for ExportNorthArrow output results in a default size that best fits the NorthArrowMarker symbol.
exportNorthArrow in interface IMapServerLayoutarrow - A reference to a com.esri.arcgis.carto.INorthArrow (in)mapDesc - A reference to a com.esri.arcgis.carto.IMapDescription (in)backgroundColor - A reference to a com.esri.arcgis.display.IColor (in)imageDesc - A reference to a com.esri.arcgis.carto.IImageDescription (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IPointCollection toPagePoints(IEnvelope pageExtent,
IImageDisplay pageDisplay,
ILongArray screenXValues,
ILongArray screenYValues)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse ToPagePoints to convert pixel coordinates on the screen to page units coordinates on the layout.
toPagePoints in interface IMapServerLayoutpageExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)pageDisplay - 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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void fromPagePoints(IEnvelope pageExtent,
IImageDisplay pageDisplay,
IPointCollection pagePoints,
ILongArray[] screenXValues,
ILongArray[] screenYValues)
throws java.io.IOException,
AutomationException
IMapServerLayoutUse FromPagePoints to convert page unit coordinates on the layout to pixel coordinates on the screen.
fromPagePoints in interface IMapServerLayoutpageExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)pageDisplay - A reference to a com.esri.arcgis.carto.IImageDisplay (in)pagePoints - 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void connect(java.lang.String filePath)
throws java.io.IOException,
AutomationException
IMapServerInit
connect in interface IMapServerInitfilePath - The filePath (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void startWithData(IDataset pDataset)
throws java.io.IOException,
AutomationException
IMapServerInit
startWithData in interface IMapServerInitpDataset - A reference to a com.esri.arcgis.geodatabase.IDataset (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void stop()
throws java.io.IOException,
AutomationException
IMapServerInit
stop in interface IMapServerInitjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setPhysicalOutputDirectory(java.lang.String dirPath)
throws java.io.IOException,
AutomationException
IMapServerInit
setPhysicalOutputDirectory in interface IMapServerInitdirPath - The dirPath (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getPhysicalOutputDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit
getPhysicalOutputDirectory in interface IMapServerInitAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void setVirtualOutputDirectory(java.lang.String dirPath)
throws java.io.IOException,
AutomationException
IMapServerInit
setVirtualOutputDirectory in interface IMapServerInitdirPath - The dirPath (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String getVirtualOutputDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit
getVirtualOutputDirectory in interface IMapServerInitAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String getFilePath()
throws java.io.IOException,
AutomationException
IMapServerInit
getFilePath in interface IMapServerInitAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getMaxRecordCount()
throws java.io.IOException,
AutomationException
IMapServerInitIn order to control the amount of information MapServer needs to process for a query, a maximum number of records can be set. This value is contained in the MaxRecordCount property. The default value for this property is 500. If 600 features match a given query only the first 500 results will be returned. You will be unable to access the remaining100 records. To be able to access these records the MaxRecordCount would need to be increased to 600. MaxRecordCount affects the following IMapServer methods: Find, Identify, QueryFeatureData, and QueryHyperlinks. It does not affect QueryFeatureCount or QueryFeatureIDs. The MaxRecordCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
getMaxRecordCount in interface IMapServerInitjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setMaxRecordCount(int count)
throws java.io.IOException,
AutomationException
IMapServerInit
setMaxRecordCount in interface IMapServerInitcount - The count (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getMaxBufferCount()
throws java.io.IOException,
AutomationException
IMapServerInitIn order to control the amount of information MapServer needs to process for a buffer, a maximum number of records to be buffered can be set. This value is contained in the MaxBufferCount property. The default value for this property is 100. If the number of features to be buffered exceeds MaxBufferCount no features will be buffered. The MaxBufferCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.
getMaxBufferCount in interface IMapServerInitjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setMaxBufferCount(int count)
throws java.io.IOException,
AutomationException
IMapServerInit
setMaxBufferCount in interface IMapServerInitcount - The count (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getMaxImageWidth()
throws java.io.IOException,
AutomationException
IMapServerInitIn order to control the size of an exported map image, IMapServerInit contains two properties: MaxImageHeight and MaxImageWidth. The default value for these properties is 2048 pixels. The MaxImageHeight can also be changed by modifying the MaxImageHeight XML tag in the MapServer's configuration file.
getMaxImageWidth in interface IMapServerInitjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setMaxImageWidth(int width)
throws java.io.IOException,
AutomationException
IMapServerInit
setMaxImageWidth in interface IMapServerInitwidth - The width (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public int getMaxImageHeight()
throws java.io.IOException,
AutomationException
IMapServerInitIn order to control the size of an exported map image, IMapServerInit contains two properties: MaxImageHeight and MaxImageWidth. The default value for these properties is 2048 pixels. The MaxImageHeight can also be changed by modifying the MaxImageHeight XML tag in the MapServer's configuration file.
getMaxImageHeight in interface IMapServerInitjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setMaxImageHeight(int height)
throws java.io.IOException,
AutomationException
IMapServerInit
setMaxImageHeight in interface IMapServerInitheight - The height (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void setPhysicalCacheDirectory(java.lang.String pCacheDir)
throws java.io.IOException,
AutomationException
IMapServerInit2
setPhysicalCacheDirectory in interface IMapServerInit2pCacheDir - The pCacheDir (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getPhysicalCacheDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit2
getPhysicalCacheDirectory in interface IMapServerInit2java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setVirtualCacheDirectory(java.lang.String pVirtualCacheDir)
throws java.io.IOException,
AutomationException
IMapServerInit2
setVirtualCacheDirectory in interface IMapServerInit2pVirtualCacheDir - The pVirtualCacheDir (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getVirtualCacheDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit2
getVirtualCacheDirectory in interface IMapServerInit2java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setSOMCacheDirectory(java.lang.String pCacheDir)
throws java.io.IOException,
AutomationException
IMapServerInit2
setSOMCacheDirectory in interface IMapServerInit2pCacheDir - The pCacheDir (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getSOMCacheDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit2
getSOMCacheDirectory in interface IMapServerInit2java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getSOMVirtualCacheDirectory()
throws java.io.IOException,
AutomationException
IMapServerInit2
getSOMVirtualCacheDirectory in interface IMapServerInit2java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void activate()
throws java.io.IOException,
AutomationException
IObjectActivate
activate in interface IObjectActivatejava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void deactivate()
throws java.io.IOException,
AutomationException
IObjectActivate
deactivate in interface IObjectActivateAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void initLogging(ILog log)
throws java.io.IOException,
AutomationException
ILogSupport
initLogging in interface ILogSupportlog - A reference to a com.esri.arcgis.system.ILog (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void interfaceSupportsErrorInfo(GUID riid)
throws java.io.IOException,
AutomationException
ISupportErrorInfoIndicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo in interface ISupportErrorInforiid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String getConfigurationName()
throws java.io.IOException,
AutomationException
IServerObject
getConfigurationName in interface IServerObjectAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.String getTypeName()
throws java.io.IOException,
AutomationException
IServerObject
getTypeName in interface IServerObjectjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IServerObjectExtension findExtensionByCLSID(java.lang.String cLSID)
throws java.io.IOException,
AutomationException
IServerObjectExtensionManager
findExtensionByCLSID in interface IServerObjectExtensionManagercLSID - The cLSID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IServerObjectExtension findExtensionByTypeName(java.lang.String name)
throws java.io.IOException,
AutomationException
IServerObjectExtensionManager
findExtensionByTypeName in interface IServerObjectExtensionManagername - The name (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||