The service components combine and encapsulate the functions of different service providers into coarse-grained modules, such as map components and data components. At the same time, it supports assembling one or more service components into a component set to provide services. The service components are configured in the < component > node, and the component set is configured in the < componentSet > node.
Both service components and sets of service components can be combined with service interfaces to provide service instances. Assuming a REST service interface called "rest" has been configured (see: Configuration of Service Interface Layer), in the configuration of the map world component above, the "rest" interface has been bound. Therefore, the URI of the service instance provided by the combination of the map world component and the rest service interface is as follows:
http://<server>:<port>/iserver/services/map-world/rest
http://<server>:<port>/iserver/services/components-rest/rest
They respectively represent the root directory of REST services contained in the map world service component and the root directory of REST services contained in the components rest component set. Through the latter, all REST services contained in the map-world, data-world, 3D-sample, and transportational-sample service components can be accessed.
The service interface type of different service components bindings are not exactly the same. Currently, the correspondence between service components and service interfaces in SuperMap iServer is shown in Table 1 Comparison between service components and service interfaces.
Table 1 Comparison between service components and service interfaces
| service component type | service interface type | Predefined service interfaces |
| map component (MapImpl) | REST Interface (RestServlet) ArcGIS REST Interface (AGSRestServlet) Baidu REST Interface (Baidu RestServlet) Google REST Interface (Google RestServlet) WMS Interface (WMSServlet) WMTS Interface (WMTSServlet) | rest、arcgisrest1、baidurest1、googlerest1 wms111、wms130 wmts100、wmts-china |
| data component (DataImpl) | REST Interface (RestServlet) ArcGIS REST Interface (AGSRestServlet) WFS Interface (WFSSServlet) WCS Interface (WCSServlet) | rest 、arcgisrest1 wfs100、wfs200 wcs111、wcs112 |
| image component (ImageImpl) | REST/JSR Interface (JaxrsServletForJersey) WMTS Interface (WMTSServlet) |
restjsr,wmts100 |
| spatial analyst component (SpatialAnalystImpl) | REST/JSR interface (JaxrsServletForJersey) WPS Interface (WPS Servlet) | restjsr wps100 |
| transportation analyst component (TransportationAnalystImpl) | REST Interface (RestServlet) ArcGIS REST Interface (AGSRestServlet) | rest、arcgisrest1 |
| traffic transfer analyst component (TrafficTransferAnalystImpl) | REST/JSR interface (JaxrsServletForJersey) | restjsr |
| 3d component (RealspaceImpl) | REST Interface (RestServlet) | rest |
| Three-dimensional network analysis (NetworkAnalyst3DImpl) | REST/JSR interface (JaxrsServletForJersey) | restjsr |
| Spatial modeling service components (GeoprocessorComponent) | GP Interface (Geoprocess sorServlet) | gpserver |
| plot component (PlotImpl) | REST Interface (RestServlet) | rest |
| vector tile component (VectorTileImpl) | ArcGIS REST Interface (AGSRestServlet) |
arcgisrest1 |
| address matching component (AddressMatchImpl) | REST/JSR interface (JaxrsServletForJersey) ArcGIS REST Interface (AGSRestServlet) |
restjsr、arcgisrest1 |
| vector map component (VectorMapImpl) | REST/JSR interface(JaxrsServletForJersey) | restjsr |
Note 1: iServer advanced and iEdge provide this interface.
Service Components Configuration Infrastructure
The structure of the < component > and < componentSet > in the config file is as follows:
<application> ... <componentSets> ... <componentSet> ... <componentSet/> </componentSets> <components> ... <component> ... <component/> </components> </application>
Map component configuration
Example of map component configuration:
<component name="map-china" class="com.supermap.services.components.impl.MapImpl" interfaceNames="rest,wms111,wms130,wmts100,wmts-china" providers="ugcMapProvider-China400"> <config class="com.supermap.services.components.MapConfig"> <useCache>false</useCache> <tileCacheConfig class="com.supermap.services.tilesource.UGCV5TileSourceInfo"> <datastoretype>TILES</datastoretype> <type>UGCV5</type> <outputPath>./output/cache</outputPath> <storageType>Original</storageType> </tileCacheConfig> <vectorTileCacheConfig class="com.supermap.services.tilesource.SVTilesTileSourceInfo"> <datastoretype>TILES</datastoretype> <type>SVTiles</type> </vectorTileCacheConfig> <useVectorTileCache>true</useVectorTileCache> <expired>0</expired> <cacheReadOnly>false</cacheReadOnly> </config> </component>
The class attribute of the <component> node identifies the implementation class of the map component; The providers attribute refers to the collection of service providers used by the map component (see: Configuration at the Service Provider Layer); The interacteName property identifies the service interface bound to the service component, and multiple service interfaces are separated by ",". See: Configuration of Service Interface Layer. The <config> node is the configuration item corresponding to the implementation of this map component, corresponding to the interface configuration class MapConfig. The following parameters are optional::
- < useCache >: Enable caching.
- < useVectorTileCache >: Whether to use the vector tiles cache.
- < cacheReadOnly >: Whether the cache file is read-only.
- < expired >:Tile expiration time. Calculate tile survival time from tile creation. The time unit is minutes, and 0 represents that the cache will never expire. This configuration is only valid for grid tile caching, attribute tile caching, and vector tile caching. Invalid for FastDFS and MongoDB.
- <cacheResamplingDisabled>: Whether to turn off tile resampling, the default is false. In order to improve the efficiency of map service rendering, iServer supports using tile caches with the same coordinate system. However, when the requested tile is inconsistent with the existing tile interms of tile starting point, pixel size, scale, format, transparency, the file cache will not be available. Based on this, iServer provides the cache resampling ability by default, and the UGCV5 tile cache generated by iServer and iDesktopX with *.sci file can be resampled, spliced and cropped, format converted, and the picture can be produced on demand, supporting the use of tile cache in the following scenarios:
- The scale of the requested tile is the same as the scale of the tile cache, but the geographic range of a single tile is inconsistent.
- The scale of the requested tile is different from the scale of the tile cache, and the geographic range of a single tile is inconsistent.
- The format of the tiles does not match the tile cache.
- The request tile is opaque but the tile cache is transparent.
- < tileCacheConfig >: Map tile configuration class, tile types support SMTiles, MongoDB, GDP. For a detailed introduction to tile format, please refer to: Tile Format. Note: After enabling single machine multiprocessing, the map service will no longer support SMTiles type map tile caching.
- When the tile type is SMTiles, the corresponding class is the com.supermap.services.tilesource.SMTilesTileSourceInfo.
- When tile type is MongoDB, the corresponding class is the com.supermap.services.tilesource.MongoDBTileSourceInfo.
- When tile type is GDP, the corresponding class is the com.supermap.services.tilesource.GDPTileSourceInfo.
- When tile type is UGCV5, the corresponding class is the com.supermap.services.tilesource.UGCV5TileSourceInfo. This class contains the following configuration items:
- <datastoreType>: Tile cache storage type. Local tiles, which is TILES.
- <type>: Tile cache type, which is UGCV5.
- <outputPath>: Tile cache storage path. To avoid cache conflicts between map services with identical names (different content) in multi-service deployments, as of iServer 2026, tile cache is stored per service. Default: ./output/cache/{serviceComponentName}. Note: When upgrading from an earlier version, old services retain the original path: ./output/cache.
- <storageType>: The storage format of the tile cache. Support primitive and compact types, namely Original and Compact, the default is Original. When used in iEdge, only the original type is supported.
- <enableDirectoryIsolation>: Whether to enable directory isolation. Default: false. When set to true, place map pre-generated cache in the <outputPath> root directory.
- <pollingInterval>: Interval in milliseconds. Default: 30000. A value greater than 0 enables tile set dynamic refresh, allowing iServer to detect new tile sets dynamically for cached rendering.
- < vectorTileCacheConfig >: Vector tiles configuration class, tile type support SVTilesTileSourceInfo, the corresponding class is the com.supermap.services.tilesource.SVTilesTileSourceInfo.
- < type >: Tilecache type. When the cache type is SMTiles, this item can be omitted.
- < tileCacheUpdateConfig >: Raster tile cache update configuration.
- < cacheReadOnly >: Whether the grid tile cache file is read-only, with priority over the public cacheReads parameter.
- < expired >: The expiration time of the grid tiles. Calculate tile survival time from tile creation. The time unit is minutes, and 0 represents that the cache will never expire. Priority is higher than the public expired parameter.
- < vectorTileCacheUpdateConfig >: Vector tiles cache update configuration.
- < cacheReadOnly >: Whether the vector tile cache file is read-only, with priority over the public cacheReads parameter.
- < expired >: The expiration time of vector tiles. Calculate tile survival time from tile creation. The time unit is minutes, and 0 represents that the cache will never expire. Priority is higher than the public expired parameter.
Please notice:
1. When you need to use the map tile cache capability, it is recommended to configure the map component cache first and set the type to UGCV5.
2. When the tile resampling function is turned on, if you modify the style or data of the original map, the picture returned may be the original one. At this time, you need to manually clean up the cache and browse the picture again,
The Data Component Configuration
Example of data component configuration:
<component name="data-world" class="com.supermap.services.components.impl.DataImpl" interfaceNames="rest,wfs100,wfs200,wcs111,wcs112" providers="ugcDataProvider-World"> <config class="com.supermap.services.components.DataConfig"> <editable>true</editable> <cacheStrategyConfig> <maxElementInMemory>100</maxElementInMemory> <timeToLiveSeconds>3</timeToLiveSeconds> <timeToIdleSeconds>3</timeToIdleSeconds> </cacheStrategyConfig> </config> </component>
Among them, the class attribute of the <component> node identifies the component type, corresponding to the implementation class DataImpl, The < config > node is the configuration item corresponding to the Data component, which is the interface configuration class DataConfig. Main parameter description:
-
< editable> Property, indicating whether it is editable. When editable is true Can be edited when.
-
< cacheStrategyConfig> Property, indicating the data query cache-related settings:
- < maxElementInMemory >: The maximum number of objects allowed to be stored in memory. The default is 100.
- < timeToLiveSeconds >: The valid duration of the object stored in the memory, in seconds. The default is 3 seconds.
- < timeToIdleSeconds >: The allowed idle time of the object stored in the memory. The unit is second, and the default is 3 seconds.
The Vector Tile Component Configuration
Example of vector tile component configuration:
<component class="com.supermap.services.components.impl.VectorTileImpl" enabled="true" initPriority="0" instanceCount="0" interfaceNames="arcgisrest" name="vectorTile-China" providers="vectorTile-China"> <config class="com.supermap.services.components.VectorTileConfig"> </config> </component>
Among them, the class attribute of the <component> node identifies the component type, corresponding to the implementation class VectorTileImpl, The < config > node is the configuration item corresponding to the Vector Tile component, which is the interface configuration class VectorTileConfig.
The Image Component Configuration
Example of image component configuration:
<component class="com.supermap.services.components.impl.ImageImpl" enabled="true" initPriority="0" instanceCount="0" interfaceNames="wmts100,restjsr" name="imageservice-ChinaImages" providers="imageservice-ChinaImages"> <config class="com.supermap.services.components.ImageConfig"> <editable>false</editable> <downloadable>false</downloadable> </config> </component>
The class attribute of the < component > node identifies the component type and corresponds to the implementation class ImageImpl. The < config > node is the configuration item corresponding to the image component, that is, the interface configuration class ImageConfig. Description of main parameters:
-
< editable> Property, indicating whether it is editable. When editable is true, it can be edited.
-
< downloadable> Property, indicating whether the image data asset can be downloaded. When downloadable is true, it can be downloaded.
The Component Set Configuration
The < componentSet > node can assemble one or more service components into a service components set. An example of a < componentSet > node is as follows:
<componentSet name="components-rest"> <component-reference name="map-world"></component-reference> <component-reference name="3D-sample"></component-reference> <component-reference name="data-world"></component-reference> <component-reference name="transportationanalyst-sample"></component-reference> </componentSet>
Custom Service Components Configuration
Add a custom component type and configure it in the system config file (iserver-system.xml). The example is as follows:
<component-type alias="SuperMap 自定义服务组件" configClass="com.supermap.services.components.SMConfig"> com.supermap.services.components.impl.SMImpl </component-type>
Wherein the com.supermap.services.components.impl.SMImpl is the implementation class of the user-defined service component type, and the com.supermap.services.components.SMConfig is the configuration class of the user-defined service component type.
The structure of the < component-type > node in the config file is as follows:
<server> <management> … <component-types> … <component-type> … </component-type> </component-types> </management> </server>
Service Components Configuration for Enable Dynamic Management
Take the data component as an example. The example is as follows:
<component name="data-world" class="com.supermap.services.components.impl.DataImpl" enabled="true" initOnCreate="true" initPriority="0" instanceCount="0" interfaceNames="rest,wfs100,wfs200,wcs111,wcs112" providers="ugcDataProvider-World"> <config class="com.supermap.services.components.DataConfig"> <editable>true</editable> </config> </component>
Where, for a < com ponent > node:
-
< initOnCreate> Property: Whether the service instance needs to be initialized immediately. After the service instance dynamic function is enabled, the default is false. The true indicates that the service instance will be initialized immediately when the iServer is started; false indicates that the service instance will not be initialized immediately, that is, the service instance will be initialized after the iServer is started.
Note that this parameter is only valid when the service instance dynamization feature is enabled.