SuperMap iServer supports the following types of map service providers:
Configure UGC Map Provider
Configure a UGC map service providers as follows:
<provider name="ugcMapProvider1" class="com.supermap.services.providers.UGCMapProvider"> <config class="com.supermap.services.providers.UGCMapProviderSetting"> <outputPath>../webapps/iserver/output</outputPath> <outputSite>http://localhost:8090/iserver/output/</outputSite> <workspacePath>server=../samples/data/World/World.sxwu;password=supermap</workspacePath> <cacheVersion>5.0</cacheVersion> <useCompactCache>false</useCompactCache> <multiThread>true</multiThread> <fullLabelEnabled>false</fullLabelEnabled> <!-- Whether to disable the expanded query function --> <inflatDisabled>true</inflatDisabled;> <poolSize>0</poolSize> <preferedPNGType>PNG</preferedPNGType> <queryExpectCount>1000</queryExpectCount> <leftTopCorner> <x>-180.0</x> <y>90.0</y> </leftTopCorner> <dpi>0</dpi> <!-- Set exclusion fields --> <excludedFieldsInMaps> <com.supermap.services.providers.ExcludedFieldsInMap> <mapName>World</mapName> <excludedFieldsInLayers> <com.supermap.services.providers.ExcludedFieldsInLayer> <layerName>Captial@World</layerName> <excludedFields>SMID,NAME</excludedFields> </com.supermap.services.providers.ExcludedFieldsInLayer> </excludedFieldsInLayers> </com.supermap.services.providers.ExcludedFieldsInMap> </excludedFieldsInMaps> </config> </provider>
The class in < provider > identifies the implementation class of the UGC service providers, and the class in <config> identifies the configuration class corresponding to the UGC service provider, that is, UGCMapProviderSetting. The contents in < config > are UGCMapProviderSetting corresponding configuration item:
- < inflatDisabled >: Is the function of expanding the query range disabled for dynamic mapping. When set to true, it means to turn off expanding the query range. For browsing tile maps, this parameter can be set to false to enable expanding queries to ensure the normal splicing of adjacent tiles and complete image output. This option needs to be set to false, which means expanding the query scope when dynamically plotting. When browsing non tile maps, in order to improve mapping performance, this parameter can be set to true, disable the expand query function, and only browse the required range of areas.
- < outputPath >: The output path of the picture.
- < outputSite >: Access the root directory of the image URI.
- < workspacePath >: The path to the workspace used by the service providers. If there is a password in the workspace, assuming the password is supermap, write it as:
-
<workspacePath>server=../samples/data/World/World.sxwu;password=supermap</workspacePath>
In addition, the workspace path supports reading from environment variables and the system config file. It can be written as:
<workspacePath>server=${datapath1}/World.sxwu;password=supermap</workspacePath>For detailed instructions, please refer to: Preset local workspace path - < cacheVersion >: Specify the version of the dynamic cache, default to 5.0. For information on the cache versions currently supported by iServer, please refer to the SuperMap Caching Policy . If compatibility with the simple cache generated by SuperMap iServer 2008 is required, the cache version needs to be set to 3.1.
- < ignoreHashcodeWhenUseCache >: If true, the original cache is ignored when it is read Hashcode, the default is false. This parameter supports both 4.0 and 5.0 caching.
- < useCompactCache >: Whether to use compact format cache, if set to true, use compact cache, default to false. Currently, only version 5.0 of the cache supports this parameter.
- < multiThread >: Whether to use multithreading. The default is true.
- < fullLabelEnabled >: Whether to display the label completely, the default is false. When set to true, the full label will be displayed when browsing the map, and the label that cannot be displayed will not be displayed.
- < poolSize >: The size of the thread buffer pool. Please refer to the parameter description of the service providers configuration for details.
- < preferedPNGType >: The preferred PNG image type when using the PNG cache, currently supported PNG and PNG8. If null, PNG is used by default. Please refer to the parameter description of service providers configuration for details.
- < Query ExpectCount >: The number of query result entries returned by the server by default, which is 1000 by default.
- < leftTop Corner >: When setting the map slice, the starting point of the upper left corner is the upper left corner coordinate of the map bounds by default.
- < dpi >: Set the DPI of the map. The minimum DPI can be set to 60. If this parameter is not set, the default value will be used. 0, that is, DPI uses the map default.
- <usePreGeneratedUGCV5Cache>: Whether to use cross-version UGCV5 primitive tiles that are locally segmented and hierarchical. The default value is false, which means it does not take effect.
- <throwExceptionWhenOutputMapError>: Whether it supports throwing an exception without producing an image when an exception ocuurs in browsing. It is true by default. If you encounter an exception that causes browsing map to fail, the request will report an error 400 and return an error message for you, such as the database connection is unavailable due to network problems or other reasons.
- < cacheDisabled >: Enable cache, used by default. The enable caching can also be set in the plotting parameter. When the two parameters conflict, the disable priority principle is adopted. Please refer to the parameter description of service providers configuration for details.
- < tileCacheReadOnly >: Grid tileread-only.
- < vectorcachedisable >: Enable vector tile caches
- < output Vector Path >: Vector tiles cache storage location
- < vectorcachereadonly >: Vector tilesread-only
- < excludedField sInMaps >: Sets the exclusion field. The administrator can exclude the fields of the specified layer as required. When the user performs the map query operation, the excluded fields cannot be viewed.
- <outputMapTimeOut>: Output map timeout time, in milliseconds. The default value is 0, indicating that the system configuration is not overridden. Setting it to -1 means it is not enabled. When rendering map through image, tileImage, tileFeature or entireImage in map services published by workspace, if the map is not fully rendered within the timeout time, the acquisition of map tiles and rendering will be stopped, and an exception will be thrown. Note: This parameter is also supported in system configuration, with a lower priority than service configuration.
The com.supermap.services.providers.ExcludedFieldsInMap and com.supermap.services.providers.ExcludedFieldsInLayer are implementation classes for field exclusion settings. < mapName > is the map name, < layerName > is the dataset name, and < excludedFields > specifies the excluded fields.
SuperMap iServer also supports Oracle, SQL Server, and DM database-type workspace as service providers. The parameters to be provided are shown in Table 1. No special instructions indicate that the parameters are required for several types.
Table 1 Setting parameters of database-type workspace information
| Parameter name | Description |
| type | The type of workspace. Currently, the supported database types are Oracle workspace, SQL Server workspace, and DM workspace, and their values are respectively ORACLE、 SQL、DM. ORACLE indicates that the workspace is stored in the oracle database, and SQL indicates that the workspace is saved in a SQL Server database, the DM indicates that the workspace is stored in the DM database. |
| name | Name of the workspace in the database. |
| username | The user name used to log in to the database. |
| password | The password used to log in to the database. |
| server | Server name. For an Oracle database, its server name is its TNS service name; for a SQL Server database, its server name is its system DSN (Database System Name); for the DM database, the server name is the IP of the machine where the DM database is located, such as 192.168.110.110. |
| database | name |
| driver | The name of the driver when using an ODBC connection. Only SQL Server databases use an ODBC connection, and the driver name can be SQL Server or SQL Native Client. |
- The <workspacePath> format for providing a data source using an Oracle database is as follows:
<workspacePath>type=ORACLE;name=testOralce;username=cq;password=cq;server=ISERVER;database=iserver</workspacePath>
- The <workspacePath> that uses the SQL database to provide the data source is:
<workspacePath>type=SQL;name=testSQL;username=sa;password=iserver;server=ISERVICE\SQL2005;driver= SQL Server;database=iserver</workspacePath>
- The <workspacePath> using the DM database to provide the data source is:
<workspacePath>type=DM;name=testDM;username=sa;password=iserver;server=ISERVICE\DM7;database=iserver</workspacePath>
In addition, multiple < providers > can be bound as a whole, that is, as a < providerSet > providing services to service components (< component >). See Configure Service Provider Collection through XML file. <provider> and <providerSet> in the config file are structured as follows:
<server> ... <application> ... <providerSets> ... <providerSet> ... </providerSet> </providerSets> <providers> ... <provider> ... </provider> </providers> </application> </server>
Configure REST Map Service Provider
The configuration REST service providers is done in the < provider > node:
<provider name="restMapProvider1" class="com.supermap.services.providers.RESTMapProvider"> <config class="com.supermap.services.providers.RESTMapProviderSetting"> <restServiceRootURL>http://localhost:8090/iserver/services/rest</restServiceRootURL> <token>GsXST0cE0CumxQUFXBX7Oopin4<token> </config> </provider>
The class in < provider > identifies the implementation class of the REST service providers, and the class in <config> identifies the configuration class corresponding to the REST service provider, that is, RESTMapProviderSetting. The contents in <config> are RESTMapProviderSetting corresponding configuration item:
- < restService RootURL >: The address of the REST map services, pointing to the root resource path of the service, such as http://localhost:8090/iserver/services/map-china/rest。
- < usecache >: Whether to use cache. The default is true. After enabling caching, REST requests for resources will be cached locally, and the next time the same request is received, it will be read directly from the cache without the need to send it to the server again.
- < restProviderCacheConfig >: The storage settings that service providers request to cache in memory, including:
- < Max ElementsInMemory >: The maximum number of request records allowed to be stored in memory. 0 means no limit; 1 means no memory cache. The default is 1. If not 1, the request record is stored in memory first.
- < maxsizeondisk >: Maximum disk capacity. The unit is MB, and the default size is 2048 MB.
- < timeToLiveSeconds >: Set the upper limit of cache survival time, and the cache will be cleared automatically after timeout. It is calculated from the creation of the record, and the unit is second. The default is 0, which means that the cache is permanently alive.
- < timeToIdleSeconds >: Set the upper limit of cache idle time, and the cache will be cleared automatically after timeout. Calculated from the last time it was accessed, in seconds. The default is 0, which means the cache is permanently alive.
- < token >: When security mechanisms are enabled, accessing protected REST resources requires providing a Token.
Configure HyperMap cloud map service provider
Hypergraph cloud service providers are configured in the < provider > node. The specific configuration is as follows:
<provider name="CloudMapProvider1" class="com.supermap.services.providers.CloudMapProvider"> <config class="com.supermap.services.providers.CloudMapProviderSetting"> <outputPath>../webapps/iserver/output</outputPath> <outputSite>http://localhost:8090/iserver/output/</outputSite> <servicesUrl>http://t2.supermapcloud.com/FileService/image</servicesUrl> <cacheEnabled>true</cacheEnable> </config> </provider>
The class in < provider > identifies the implementation class of hypergraph cloud service providers, and the class in <config> identifies the configuration class corresponding to the hypergraph cloud service provider. Class identifies the configuration class corresponding to the hypergraph cloud service providers, namely CloudMapProviderSetting, and the content in <config> corresponds to CloudMapProviderSetting corresponding configuration item:
- < output path >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < servicesUrl >: The plotting service address of the remote hypergraph cloud map service. If the user sets ServicesUrl, the service address set by the user is used; otherwise, the default service address: http://t2.supermapcloud.com/FileService/image is used.
- < cacheEnabled >: Whether to cache locally. When true, the map cache can be generated locally when the published service is accessed, so as to improve the speed of subsequent service browsing access. The default is true.
- < tileCacheReadOnly >: Grid tileread-only.
Configure GDP Map Service Provider
GDP map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.GDPMapProvider" enabled="true" name="gdpMapProvider-"> <config class="com.supermap.services.providers.GDPMapProviderSetting"> <cacheVersion>5.0</cacheVersion> <filesPath>F:\SuperMap\China_58b994e9-5856-4a10-a0dc-0e0e177d7962\7_0000_0000_192.168.120.42_2014_03_03_14_01_56.zip</filesPath> <dpi>96.0</dpi> <tileSize>256</tileSize> <zoom0ScaleDenator>5.916587109091312E8</zoom0ScaleDenator> </config> </provider>
The class in < provider > identifies the implementation class of GDP service providers, and the class in <config> identifies the configuration class corresponding to the GDP service provider, that is, GDPMapProviderSetting, and the content in < config > corresponds to GDPMapProviderSetting corresponding configuration item:
- < files path >: Path to the GDP tile package.
- < cacheVersion >: The version of the tile.
- < dpi >: The DPI of the tile. The default is 96.
- < tileSize >: The size of the tile. The default is 256.
- < zoom0ScaleDenator >: Scale denominator of generation 0, default is 5.916587109091312E8.
- < bounds >: Map bounds, default:-20037508.3427892440,-20037508. 3427892440, 20037508. 3427892440, 20037508. 3427892440.
- < format >: The format of the tile, such as PNG.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure UGCV5 Map Provider
Configure MongoDB Map Service Provider
The MongoDB service providers is configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.MongoDBTileProvider" enabled="true" name="mongoDBMapProvider-China"> <config class="com.supermap.services.providers.MongoDBTileProviderSetting"> <serverAdresses> <string>localhost:27017</string> </serverAdresses> <mapName>China</mapName> <tilesetName>1181328118</tilesetName> <database>smtiles</database> <username>iserver</username> <password>iserver</password> </config> </provider>
The class in < provider > identifies the implementation class of the MongoDB service providers, and The class in <config> identifies the configuration class corresponding to the MongoDB service provider, that is, MongoDB TileProviderSetting, and the content in < config > corresponds to MongoDBTileProviderSetting corresponding configuration item:
- < serverAdresses >: The address of the MongoDB server.
- < mapName >: The name of the published map name. If it is not set, all maps of the current storage location will be published by default.
- < tilesetName >: The name of the published tile set, which does not need to be set manually.
- < database >: The database used to store these map tiles. The default is to use the name smtiles The database for.
- < username >: The user name with permission to access the database.
- < password >: The password for the user.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure UGCV5 Map Provider
Configure MongoDB MVT Map Service Provider
The MongoDB MVT service providers is configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.MongoDBMVTTileProvider" enabled="true" name="mongodbMvt-China">
<config class="com.supermap.services.providers.MongoDBTileProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<serverAdresses>
<string>localhost:27017</string>
</serverAdresses>
<mapName>China</mapName>
<tilesetName>China</tilesetName>
<database>mvt</database>
<username>iserver</username>
<password>iserver</password>
</config>
</provider>
The class in < provider > identifies the implementation class of the MongoDB MVT service providers, and the class in <config> identifies the configuration class corresponding to the MongoDB service provider, that is, MongoDB TileProviderSetting, and the content in < config > corresponds to MongoDBTileProviderSetting corresponding configuration item:
- < serverAdresses >: The address of the MongoDB server.
- < mapName >: The name of the published map name. If it is not set, all maps of the current storage location will be published by default.
- < tilesetName >: The name of the published tile set, which does not need to be set manually.
- < database >: The database used to store these map tiles. The default is to use the name smtiles The database for.
- < username >: The user name with permission to access the database.
- < password >: The password for the user.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure UGCV5 Map Provider
Configure OTS Map Service Provider
The OTS service providers is configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.OTSTileProvider" enabled="true" name="ots-map">
<config class="com.supermap.services.providers.OTSTileProviderSetting">
<outputPath>D:\SuperMap\SuperMapiServer9D\webapps\iserver\output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<nodeName>cn-hangzhou</nodeName>
<instanceName>tileStore</instanceName>
<accessKeyId>accessKeyId</accessKeyId>
<accessKeySecret>accessKeySecret</accessKeySecret>
<fromPublic>true</fromPublic>
</config>
</provider>
The class in < provider > identifies the implementation class of the OTS service providers, and the class in <config> identifies the configuration class corresponding to the OTS service provider, that is, OTSTileProviderSetting. The content in < config > corresponds to OTSTileProviderSetting corresponding configuration item:
- < output path >: The output path of the picture.
- < outputSite >: Access the root directory of the image URI。
- < nodename >: Node name. Alibaba Cloud service node is the address selected when creating an instance.
- < instancename >: Instance name. Fill in the instance name created in Alibaba Cloud console management here.
- < accessKeyId >: The AccessKeyId applied for in the "Management Console" on the AliCloud official website.
- < accessKeySecret >: The AccessKeySecret applied for in the "Management Console" on the AliCloud official website.
- < frompublic >l From public. For public network access, the access OTS service address is: http://<instanceName>.<nodeName>.ots.aliyuncs.com. For non-public access, the OTS service address is: http://<instanceName>.<nodeName>.ots-internal.aliyuncs.com.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure ugcv5 map provider
Configure SMTiles Map Service Provider
The SMTiles service providers is configured in the < provider > node. The specific configuration is as follows:
<provider name="smtilesMapProvider1" class="com.supermap.services.providers.SMTilesMapProvider"> <config class="com.supermap.services.providers.SMTilesMapProviderSetting"> <filePath>../webapps/iserver/output/sqlite/World_-411043745_256X256_PNG.smtiles</filePath> </config> </provider>
The class in < provider > identifies the implementation class of SMTiles map service providers, and the class in <config> identifies the configuration class corresponding to the SMFiles map service provider, that is, SMTilesMapProviderSetting, and the content in < config > corresponds to SMTilesMapProviderSetting corresponding configuration item:
- < filePath >: Path to the SMTiles cache file. The cache file can be a SuperMap SMTiles cache files generated by iServer and iEdge.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure UGCV5 Map Provider
- <returnNoContentStatusWhenNoTileData>: When accessing a non-existent tile data region and level, whether an HTTP status code is returned to indicate that the region is not tile-free. The default is false; in this case, a transparent image will be returned. When set to true, HTTP status code 204 is returned.
Configure SVTiles Map Service Provider
The SVTiles service providers is configured in the < provider > node. The specific configuration is as follows:
<provider name="svtilesMapProvider1" class="com.supermap.services.providers.SVTilesMapProvider"> <config class="com.supermap.services.providers.SVTilesMapProviderSetting"> <filePath>../webapps/iserver/output/sqlite/World_1715141636_256X256.svtiles</filePath> </config> </provider>
The class in < provider > identifies the implementation class of SVTiles map service providers, and the class in <config> identifies the configuration class corresponding to the SVTiles map service provider, that is, SVTilesMapProviderSetting, and the content in < config > corresponds to SVTilesMapProviderSetting corresponding configuration item:
- < filePath >: The path to the SVTiles cache file. The cache file can be a SuperMap SVTiles cache files generated by iServer and iEdge.
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). The default is false. Please refer to for details Configure UGCV5 Map Provider
Configure UGCV5 Map Service Provider
UGCV5 service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.UGCV5TileProvider" enabled="true" name="ugcv5-China"> <config class="com.supermap.services.providers.UGCV5TileProviderSetting"> <watermark> <imageUrl>F:/test/test.png</imageUrl> <imageAlpha>0.5</imageAlpha> <txtContent>ABCD</txtContent> <fontSize>5</fontSize> <fontColor> <red>255</red> <green>0</green> <blue>0</blue> <alpha>255</alpha> </fontColor> <fontStyle>Microsoft YaHei</fontStyle> <xIndex>4</xIndex> <yIndex>5</yIndex> <random>50</random> </watermark> <configFile>../webapps/iserver/output/cache/China/China.sci</configFile> </config> </provider>
The class in < provider > identifies the implementation class of UGCV5 service providers, and the class in <config> identifies the configuration class corresponding to the UGCV5 service provider, that is, UGCV5TileProviderSetting, and the content in < config > corresponds to UGCV5TileProviderSetting corresponding configuration item:
- < configFile >: config file or index file for SuperMap UGC V5 tile (*.sci Or *.inf).
- < watermark >: Set whether the published tile has a watermark (the type added includes: image or text). When both are configured at the same time, the picture is displayed first). The default is false.
- < imageUrl >: The path to the image.
- < imageAlpha >: The transparency of the image. Range: 0-> 1. Default: 0.8
- < txt Content >: Text content.
- < font size >: The size of the text. Default: 20
- < font Color >: Text color. Default: 100,100,100,128
- < fontStyle >: Text type. Default: Dialog
- < xIndex >: Position X of the watermark. Default: center point X of tile
- < yIndex >: Position y of the watermark. Default: center point y of tile
- < random >: The probability that each tile will display a watermark. Range: 1 — > 100. Default: 25
In addition, SuperMap iServer supports the configuration of UGCV5 primitive tiles stored in the S3 object storage service as follows:
<provider class="com.supermap.services.providers.UGCV5TileProvider" enabled="true" name="map-China-9">
<config class="com.supermap.services.providers.UGCV5TileProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<configFile>/iserver-1311973718/picture/png/China/China.sci</configFile>
<s3ConnectionInfo>
<endpoint>https://cos.ap-beijing.myqcloud.com</endpoint>
<region>us-east-1</region>
<accessKey>AKIDwlNmxtgJ0UQDqHWYLtCH7C2dx4yRhjs0</accessKey>
<secretKey>1Dya5OTSM4av3w4Vr3A3kJoBPREnJfqn</secretKey>
</s3ConnectionInfo>
</config>
</provider>
Among,
- < outputPath >: The default storage location for map tiles is/ output。
- < outputSite >: The publishing site for map tiles. The default is http://{ip}:{port}/iserver/output/.
- < configFile >: config pathThe storage path in the S3 object storage service.
- < s3ConnectionInfo >: The connection info for the S3 Object Store service.
- < endpoint >: The endpoint node is the area domain name of the object storage service in different areas, which is used to process the access requests of their respective areas.
- < region >: The region where the Bucket is located in the object storage service. When the storage type is This parameter is required for Amazon S3 object storage.
- < accessKey >: Access key ID. The unique identifier associated with the private access key; the access key ID is used with the private access key to cryptographically sign the request.
- < secretKey >: The private access key used in conjunction with the access key ID to cryptographically sign the request, identify the sender, and prevent the request from being modified.
Configure WMS Map Service Provider
The configuration WMS service providers is done in the < provider > node:
<!-- Example of a WMS map service provider using remote WMS services as the data source.-->
<provider name="wmsMapProvider" class="com.supermap.services.providers.WMSMapProvider">
<config class="com.supermap.services.providers.WMSMapProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<cacheEnabled>false</cacheEnabled>
<serviceRootURL>http://localhost:7070/geoserver/wms</serviceRootURL>
<username></username>
<password></password>
<version>1.3.0</version>
<reverseLayerOrder>false</reverseLayerOrder>
<defaultScale>1.0E-5</defaultScale>
<reverseCoordinateSRS>
<string>EPSG:4326</string>
<string>EPSG:3857</string>
</reverseCoordinateSRS>
</config>
</provider>
The class in < provider > identifies the implementation class of the WMS service providers, and the class in <config> identifies the configuration class corresponding to the WMS service provider, that is, WMSMapProviderSetting. The contents in < config > are WMSMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < cacheEnabled >: Enable caching.
- < serviceRootURL >: The root directory of the WMS service.
- < username >: Username for WMS service authorization access (optional).
- < password >: The password for WMS service authorization access (optional).
- < version >: WMS service version.
- < reverseCoordinateSRS >: Flips the coordinate system (optional) when using a remote When the WMS service (1.1.1 and 1.3.0) is the data source, you can set this parameter to flip one or more coordinate systems.
- < reverseLayerOrder >: Set whether the order of layers is reversed.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure WMTS Map Service Provider
The configuration WMTS service providers is done in the < provider > node:
<!-- Example of WMTS map service provider, using remote WMTS services as the data source.--> <provider name="wmtsMapProvider" class="com.supermap.services.providers.WMTSMapProvider"> <config class="com.supermap.services.providers.WMTSMapProviderSetting"> <serviceRootURL>http://server:7070/geoserver/wmts</serviceRootURL> <username></username> <password></password> <version>1.0.0</version> <dpi>90.7142857142857</dpi> <layers> <com.supermap.services.providers.WMTSMapLayer> <identifier>world:Countries</identifier> <tileMatrixSet>EPSG:4610</tileMatrixSet> </com.supermap.services.providers.WMTSMapLayer> <com.supermap.services.providers.WMTSMapLayer> <identifier>nurc:Img_Sample</identifier> <tileMatrixSet>EPSG:900913</tileMatrixSet> </com.supermap.services.providers.WMTSMapLayer> </layers> <reverseTopLeftCorner>EPSG:4610</reverseTopLeftCorner> <reverseBoundingBox>urn:ogc:def:crs:EPSG::4610</reverseBoundingBox> <cacheEnabled>true</cacheEnabled> <resolutions>0.01903568804664224,0.00951784402332112,......</resolutions> <calcDefaultScaleByResolution>false</calcDefaultScaleByResolution> <originPoint>-20037508.3427892,20037508.3427892</originPoint> </config> </provider>
The class in < provider > identifies the implementation class of the WMTS service providers, and the class in <config> identifies the configuration class corresponding to the WMTS service provider, that is, WMTSMapProviderSetting. The contents in < config > are WMTSMapProviderSetting corresponding configuration item:
- < serviceRootURL >: The root directory of the WMTS service.
- <remoteMapMetaRefreshInterval>: The refresh interval for the WMTS remote service. The unit is seconds, with a default value of 0. When set to 0, the global configuration is used. If set to a value less than 0, refreshing is completely disabled. If set to a value greater than 0, that value will be used for refreshing, taking precedence over any parameter with the same name in the system configuration.
- username: Username for WMTS service authorization access (optional).
- password: The password for WMTS service authorization access (optional).
- version: wmts service version (version 1.0.0 is currently supported).
- dpi: The dpi of the WMTS service source.
- layers: The collection of layers in the WMTS service.
- reverseTopLeftCorner: The default parsing rule of iServer for TopLeftCCorner: When TileMatrixSet uses a geographic coordinate system and its SupportedCRS uses the EPSG namespace, TopLeftCCorner is parsed in the order of Y X; In other cases, analyze TopLeftCCorner in the order of X and Y. Separate multiple crs with commas in English. If the TopLeftCCorner of the WMTS service used does not meet the rule, the Identifier under the TileMatrixSet tag corresponding to the TopLeftCCorner needs to be added to the configuration item of the WMTSMapProvider's reverseTopLeftCCorner. The identifier will be parsed in the reverse coordinate order of the TileMatrixSet according to the default rule. In the example, the tileMatrixSet with Identifier EPSG: 4610 and SupportedCRS is urn: ogc:def:crs:EPSG:: 4610, TopLeftCCorner in Geoserver uses XY coordinate order, which is opposite to the default parsing rule of iServer. Therefore, the tileMatrixSet identifier for this layer has been added under this configuration item.
- cacheEnabled: Whether to cache locally. The default is true.
- resolutions: The resolution corresponding to each level of the WMTS service (optional). And under the selected matrix set The TileMatrix is consistent, and adjacent resolutions are separated by commas. You need to fill in the resolutions corresponding to all levels under TileMartrix.
- calcDefaultScaleByResolution: Whether to calculate the default scale according to the default resolution. Default false
- originPoint: Obtain the XY coordinates of the starting point (optional), separated by ",".
- reverseBoundingBox: Set the CRS set that needs to resolve the BoundingBox in reverse order. Multiple CRS are separated by a comma ",". When this parameter is set, the parsing of BoundingBox will be in the order of YX.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure Bing Maps Map Service Provider
BingMaps service providers takes place in the < provider > node. The specific configuration is as follows:
<provider name="BingMapsMapProvider1" class="com.supermap.services.providers.BingMapsMapProvider"> <config class="com.supermap.services.providers.BingMapsMapProviderSetting"> <outputPath>../webapps/iserver/output</outputPath> <outputSite>http://localhost:8090/iserver/output/</outputSite> <apiKey>fdskjkfdsk</apiKey> <bingmapsRootUrl>http://localhost:9876/bingmaps/</bingmapsRootUrl> <imagerySet>Road</imagerySet> <mapVersion>v1</mapVersion> <cacheEnabled>true</cacheEnable> </config> </provider>
The class in < provider > identifies the implementation class of the BingMaps service providers, and the Class identifies the configuration class corresponding to the BingMaps service providers, that is, BingMapsMapProviderSetting, and the contents in < config > are BingMapsMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < apiKey >: Set the authorization key for BingMaps. Accessing the BingMaps map service requires applying for a key, which is provided by BingMaps.
- < bingmapsRootUrl >: The plotting service address of the remote BingMaps map services.
- < imagerySet >: The name of the Bing Maps' atlas. BingMaps provides several datasets, including "Aerial," "AerialWithLabs," "Birdseye," "BirdseyeWithLabs," and "Road," corresponding to different types of map services.
- < mapVersion >: The map version of BingMaps, such as "v0", "v1".
- < cacheEnabled >: Whether to cache locally. When true, the map cache can be generated locally when the published service is accessed, so as to improve the speed of subsequent service browsing access. The default is true.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure Google Maps Service Provider
Google Maps map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.GoogleMapsMapProvider" enabled="true" name="googlemap"> <config class="com.supermap.services.providers.GoogleMapsMapProviderSetting"> <outputPath/> <outputSite/> <cacheEnabled>false</cacheEnabled> <googleMapLanguage>zh-cn</googleMapLanguage> <googleMapCryptoKey>abcdefghijklmn=</googleMapCryptoKey> <googleMapClientID>myClientID</googleMapClientID> <googleMapWidth>400</googleMapWidth> <googleMapHeight>400</googleMapHeight> <googleProxyAddress>127.0.0.1</googleProxyAddress> <googleProxyPort>8787</googleProxyPort> <useTileImage>true</useTileImage> </config> </provider>
The class in < provider > identifies the implementation class of Google map service providers, and The class in <config> identifies the configuration class corresponding to the Google Maps service provider, that is, GoogleMapsMapProviderSetting, and the content in < config > is GoogleMapsMapProviderSetting corresponding configuration item:
- < apiKey >: API key for Google Maps, when using Api Key Required to access Google Maps. (Google Maps supports API key access only, but there may be request restrictions in this way. To avoid quota restrictions, it can be accessed through signature with private key. In this case, it needs to be filled in.) googleMapCryptoKey。)
- < googleMapClientID >: An account with access to Google Maps. When used ClientID is required to access Google Maps.
- < googleMapCryptoKey >: The private key for this account. When ClientID is used Required to access Google Maps.
- < googleMapLanguage >: The language used for text annotations in the map.
- < googleMapWidth >: The width (in pixels) of a tile each time it is requested from Google Maps. Because a single tile may have a Geoogle watermark on it for each request, making the tile larger reduces the watermark density throughout the window. However, if a single tile is too large, it may affect the efficiency of tile acquisition, because you should set a reasonable value according to the hardware, software and network conditions.
- < googleMapHeight >: The height (in pixels) of a tile each time it is requested from Google Maps. Generally, it is set to a tile with equal width and height.
- < googleProxyAddress >: Proxy access to Google Maps The address of. If Google Maps cannot be accessed properly, this parameter needs to be set.
- < googleProxyPort >: a port for proxy access to Google Maps. If you can't access Google properly Maps, you need to set this parameter.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure Baidu Map Service Provider
The Baidu map provider is configured in the < provider > node. The specific configuration is as follows:
<provider name="baiduMapProvider1" class="com.supermap.services.providers.BaiduMapProvider">
<config class="com.supermap.services.providers.BaiduMapProviderSetting">
<outputPath>../webapps/iserver/output</outputPath>
<outputSite>http://localhost:8090/iserver/output/</outputSite>
<mapUrl>http://online0.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=pl</mapUrl>
<mapName>true</mapName>
<cacheEnabled>true</cacheEnable>
</config>
</provider>
The class in < provider > indicates the implementation class of Baidu map service providers, and the class in <config> identifies the configuration class corresponding to the Baidu Map service provider, namely BaiduMapProviderSetting, and the contents in < config > are BaiduMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < mapUrl >: The map service URL should be an address template that can obtain the map slice, where { X }, { y }, and { Z } represent the column number, row number, and level of the slice respectively. Http://online0.map.bdimg.com/tile/?qt=tile&x= { X } & y = { y } & Z = { Z } & styles = pl
- < mapName >: Customize the map name. When mapUrl is configured but this parameter is not configured, the default is "Baidu".
- < cacheEnabled >: Whether to cache locally. When true, the map cache can be generated locally when the published service is accessed, so as to improve the speed of subsequent service browsing access. The default is true。
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure OpenStreetMap Map Service Provider
OpenStreetMap map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider name="openStreetMapProvider1" class="com.supermap.services.providers.OpenStreetMapProvider">
<config class="com.supermap.services.providers.OpenStreetMapProviderSetting">
<outputPath>../webapps/iserver/output</outputPath>
<outputSite>http://localhost:8090/iserver/output/</outputSite>
<mapUrl>http://a.tile.openstreetmap.org/{z}/{x}/{y}.png</mapUrl>
<mapName>true</mapName>
<cacheEnabled>true</cacheEnable>
<apikey>abcdefg</apikey>
</config>
</provider>
The class in < provider > identifies the implementation class of OpenStreetMap map service providers, and the class in <config> identifies the configuration class corresponding to the OpenStreetMap map service provider, namely OpenStreetMap ProviderSetting, and the contents in < config > are OpenStreetMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < mapUrl >: The map service URL should be an address template that can obtain the map slice, where {X}, {y}, and {Z} represent the column number, row number, and level of the slice respectively. For example, http://a.tile.openstreetmap.org/{z}/{x}/{y}.png.
- < mapName >: Customize the map name. When mapUrl is configured and this parameter is not configured, the default is "OSM".
- < cacheEnabled >: Whether to cache locally. When true, the map cache can be generated locally when the published service is accessed, so as to improve the speed of subsequent service browsing access. The default is true.
- < apikey >: key to access OpenStreetMap, optional parameter. If this parameter is not configured, the map may display a watermark.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure Tianditu Map Service Provider
Map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.TiandituMapProvider" enabled="true" name="tiandituMapProvider1"> <config class="com.supermap.services.providers.TiandituMapProviderSetting"> <outputPath>../webapps/iserver/output</outputPath> <outputSite>http://localhost:8090/iserver/output/</outputSite> <servicesUrl>http://t5.tianditu.gov.cn</servicesUrl> <cacheEnabled>true</cacheEnable> <key>efb100fb46e3849b93f508c8fb949926</key> </config> </provider>
The class in < provider > identifies the implementation class of the service providers of the world map, and the class in <config> identifies the configuration class corresponding to the Tianditu service provider, namely TiandituMapExtendeSetting, and the contents in < config > are TiandituMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < servicesUrl >: The mapping service address for remote sky map services. The format is as follows: http://t<number>.tianditu.gov.cn. The service address number provided by Tianmu ranges from 0 to 7. If the user sets the servicesUrl, the service address set by the user will be used. Otherwise, a random value from 0 to 7 will be selected as the number to construct the service address.
- < cacheEnabled >: Whether to cache locally. When true, the map cache can be generated locally when the published service is accessed, so as to improve the speed of subsequent service browsing access. The default is true.
- < key >: Token string required for calling map API and service interfaces. Token can be obtained by the www.tianditu.gov.cn (please select " Browser Side " license when requesting).
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
Configure ArcGIS REST Map Service Provider
The ArcGIS REST service providers is configured in the < provider > node. The configuration is as follows:
<provider class="com.supermap.services.providers.ArcGISRestMapProvider" enabled="true" name="arcgis-Countries2"> <config class="com.supermap.services.providers.ArcGISRestMapProviderSetting"> <restServiceRootURL>http://localhost:6080/arcgis/rest/services/mytest/Countries/MapServer</restServiceRootURL> <cacheEnabled>false</cacheEnabled> <token>_jLYzPo-SEJRXfB3Q-W2EearDDnaIZTqQqUfju4GD8Owd6PIiUVmabUJiSdZeX1V</token> <httpReferer>ISERVER</httpReferer> <replaceTRNS>false</replaceTRNS> <customMapName>test</customMapName> </config> </provider>
The class in < provider > identifies the implementation class of ArcGIS REST map service providers, and the class in <config> identifies the configuration class corresponding to the ArcGIS REST map service provider, that is, ArcGISRestMapProviderSetting, and the content in < config > corresponds to ArcGISRestMapProviderSetting corresponding configuration item:
- < restServiceRootURL >: ArcGIS REST service address.
- < token >: Token string for services to be published with restricted access. If security control is enabled for the service to be published and "Token" is selected for the security type, an available Token string.
- < httpReferer >: HTTP for services to be published with restricted access Referer string. If security control is enabled for the service to be published, "Token" is selected for the security type, and HTTP is filled in to get token Referer, this item needs to be set.
- < replaceTRNS >: The default value is false, which returns the original tile. For ArcGIS Some images returned by the Server are in PNG 24 format (transparency is not supported) and contain tRNS data blocks (image transparent data blocks). The images in this format do not support the transparency effect in a standard way, and the transparency effect cannot be seen in the browser. If you expect to see the transparency effect in the returned picture, set the The replaceTRNS value is true, so that when a PNG24 is detected and contains a tRNS data block, a PNG32 (transparent) picture is regenerated. Then fill in the value of the Alpha channel of the PNG32 image according to the tRNS, which has a certain performance overhead.
- < customMapName >: used to specify the map name after forwarding to the REST map services.
- < tileCacheReadOnly >: Set whether the grid tile cache is read-only.
- < filterVisibleScales >: Forwarding ArcGIS REST Whether to return the filtered scale TileMatrix according to the visible scale and other information after the service is the WMTS service. The default value is true.
Configure ArcGIS TPK Map Service Provider
The TPK service providers is configured in the < provider > node. The configuration is as follows:
<provider class="com.supermap.services.providers.TPKMapProvider" enabled="true" name="tpk-map1"> <config class="com.supermap.services.providers.TPKMapProviderSetting"> <tilePackagePath>../samples/data/map1.tpk</tilePackagePath> </config> </provider>
The class in < provider > identifies the implementation class of TPK map service providers, and the class in <config> identifies the configuration class corresponding to the TPK map service provider, that is, TPKMapProviderSetting, and the content in < config > corresponds to TPKMapProviderSetting corresponding configuration item:
- < tilePackagePath >: Path to the TPK file.
Configure ArcGIS TPKX Map Service Provider
The TPKX service providers is configured in the < provider > node. The configuration is as follows:
<provider class="com.supermap.services.providers.TPKXMapProvider" enabled="true" name="tpkx-map1"> <config class="com.supermap.services.providers.TPKXMapProviderSetting"> <tilePackagePath>../samples/data/map1.tpkx</tilePackagePath> <replaceTRNS>false</replaceTRNS> </config> </provider>
The class in < provider > identifies the implementation class of TPK map service providers, and the class in <config> identifies the configuration class corresponding to the TPK map service provider, that is, TPKMapProviderSetting, and the content in < config > corresponds to TPKXMapProviderSetting corresponding configuration item:
- < tilePackagePath >: Path to the TPKX file.
- < replaceTRNS >: The default value is false, which returns the original tile. For ArcGIS Some images returned by the Server are in PNG 24 format (transparency is not supported) and contain tRNS data blocks (image transparent data blocks). The images in this format do not support the transparency effect in a standard way, and the transparency effect cannot be seen in the browser. If you expect to see the transparency effect in the returned picture, set the The replaceTRNS value is true, so that when a PNG24 is detected and contains a tRNS data block, a PNG32 (transparent) picture is regenerated. Then fill in the value of the Alpha channel of the PNG32 image according to the tRNS, which has a certain performance overhead.
Configure ArcGIS VTPK Map Service Provider
The VTPK service providers is configured in the < provider > node. The configuration is as follows:
<provider class="com.supermap.services.providers.VTPKMapProvider" enabled="true" name="vtpk-map1">
<config class="com.supermap.services.providers.VTPKMapProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<vectorTilePackagePath>../samples/data/map1.vtpk</vectorTilePackagePath>
<center>
<x>1.303397289E7</x>
<y>4390875.375</y>
</center>
</config>
</provider>
The class in < provider > identifies the implementation class of VTPK map service providers, and the class in <config> identifies the configuration class corresponding to the VTPK map service provider, that is, VTPKMapProviderSetting, and the content in < config > corresponds to VTPKMapProviderSetting corresponding configuration item:
- < vectorTilePackagePath >: Path to the VTPK file.
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
-
: Set the center point of the map (optional).
- < X >: Abscissa of the center point.
- < y >: Ordinate of the center point.
Configuration GeoPackage Map Service Provider
The GeoPackage service providers is configured in the < provider > node. The configuration is as follows:
<provider class="com.supermap.services.providers.GeoPackageMapProvider" enabled="true" name="gpkgMap-map"> <config class="com.supermap.services.providers.GeoPackageMapProviderSetting"> <outputPath>F:\dev\trunk\etc\iserver-debug\src\test\webapps\iserver\output</outputPath> <outputSite>http://localhost:8090/iserver/output/</outputSite> <filePath>E:/data/geopackage/map.gpkg</filePath> <defaultMapPrjCoordSys>0</defaultMapPrjCoordSys> <queryExpectCount>1000</queryExpectCount> <axisPositiveDirection>RightUp</axisPositiveDirection> <originalPoint>-180,-90</originalPoint> </config> </provider>
The class in < provider > identifies the implementation class of GeoPackage map service providers, and the class in <config> identifies the configuration class corresponding to the GeoPackage map service provider, that is, GeoPackageMapProviderSetting, and the content in < config > corresponds to GeoPackageMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < filePath >: The path to the GeoPackage file.
- < defaultMapPrjCoordSys >: The default projection of the map after the GeoPackage file is published as map services.
- < queryExpectCount >: The number of queries expected to be returned. The default is 1000.
- < axisPositiveDirection >: The positive direction of the coordinate axis. Including RightDown And RightUp. The default is RightDown.
- < originalPoint >: Slice origin, format {X}, {y}.
Configure ZXYTiles Map Service Provider
The ZXYTiles service providers is configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.ZXYTilesMapProvider" enabled="true" name="zxytest">
<config class="com.supermap.services.providers.ZXYTilesMapProviderSetting">
<outputPath>../../webapps/iserver/output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<filePath>E:/data/ZXYTilesSample.zip</filePath>
</provider>
The class in < provider > identifies the implementation class of ZXYTiles map service providers, and the class in <config> identifies the configuration class corresponding to the ZXYTiles map service provider, that is, ZXYTilesMapProviderSetting, and the content in < config > corresponds to ZXYTilesMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < filePath >: The path where ZXYTiles tile files in zip format or uncompressed ZXYTilestile files are stored (The path needs to be written to the level where the map name is located. If there are multiple maps under such a level, multiple map tiles will be published together.).
Configure ArcGIS Cache Map Service Provider
ArcGIS cache service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.ArcGISCacheMapProvider" enabled="true" name="agscache-WorldCitiesPopulation">
<config class="com.supermap.services.providers.ArcGISCacheMapProviderSetting">
<outputPath>../../webapps/iserver/output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<configFile>E:/data/arcgiscache/sample/World Cities Population/conf.xml</configFile>
</config>
</provider>
The class in < provider > identifies the implementation class of ArcGIS cache map service providers, and the class in < config > Class identifies the configuration class corresponding to ArcGIS cache service providers, that is, ArcGISCacheMapProviderSetting, and the content in < config > corresponds to ArcGISCacheMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < configFile >: Path to the ArcGIS config path (*.xml or *.cdi).
Configuring ArcGIS Compact Caching (V2) Map Service Provider
The ArcGIS Compact Cache (V2) service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.ArcGISCacheV2MapProvider" enabled="true" name="agscachev2-WorldCitiesPopulation">
<config class="com.supermap.services.providers.ArcGISCacheMapProviderSetting">
<outputPath>../../webapps/iserver/output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<configFile>E:/data/arcgiscachev2/sample/World Cities Population/conf.xml</configFile>
</config>
</provider>
Where class in < provider > identifies ArcGIS Compact Cache (V2) Implementation class of map service providers. The class in < config > identifies the configuration class corresponding to ArcGIS Compact Cache (V2) service providers, that is, ArcGISCacheMap ProviderSetting . The content in < config > corresponds to ArcGISCacheMap ProviderSetting. corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < configFile >: Path to the ArcGIS Compact Cache (V2) config file (*.xml or *.cdi).
Configure UGCV5 (MVT) Map Service Provider
<provider class="com.supermap.services.providers.MVTTileProvider" enabled="true" name="UGCV5-MVT-MAP">
<config class="com.supermap.services.providers.MVTTileProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<configFilePath>E:/supermap_packages/data/China_mvt/China.sci</configFilePath>
</config>
</provider>
The class in < provider > identifies the implementation class of UGCV5 (MVT) map service providers, and the class in < config > identifies the configuration class corresponding to the UGCV5 (MVT) service provider, that is, MVTTileProviderSetting. The contents in < config > are MVTTileProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < configFilePath >: Path to the UGCV5 (MVT) cache file (* sci).
Configure Shapefile Map Service Provider
Configure a Shapefile map service providers as follows:
<provider class="com.supermap.services.providers.ShapefileMapProvider" enabled="true" name="shapefileMap-">
<config class="com.supermap.services.providers.ShapefileMapProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<cacheDisabled>false</cacheDisabled>
<shpDir>E:/supermap/data/shp</filePath>
<styleFile>E:/data/styles/style.json</styleFile>
<charset>UTF-8</charset>
</config>
</provider>
The class in < provider > identifies the implementation class of the Shapefile map service providers, and the class in < config > identifies the configuration class corresponding to the Shapefile map service provider, that is, ShapefileMapProviderSetting, and the content in < config > is the ShapefileMapProviderSetting corresponding to the configuration items in:
- < output path >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < cachedisabled >: Enable cache.
- < shpDir >: The directory where the Shapefile database file is located.
- < charset >: Sets the encoding format.
- < styleFile >: The style file path, in JSON format, is used to specify the style of the map. Documents to be followed Mapbox Style Specification.
Configure PostGIS Map Service Provider
PostGIS map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.PostgisMapProvider" enabled="true" name="map-postGIS">
<config class="com.supermap.services.providers.PostgisMapProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<cacheDisabled>false</cacheDisabled>
<dbType>postgis</dbType>
<host>192.168.17.212</host>
<port>5432</port>
<database>postGIS</database>
<user>postgres</user>
<passwd>iserver</passwd>
<styleFile>E:/data/styles/style.json</styleFile>
</config>
</provider>
The class in < provider > identifies the implementation class of PostGIS map service providers, and the class in < config > identifies the configuration class corresponding to the PostGIS service provider, that is, PostgisMapProviderSetting, and the content in < config > corresponds to PostgisMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < cacheDisabled >: Enable cache.
- < dbType >: Enginetype.
- < host >: The address of the PostGIS server.
- < port >: The port number of the PostGIS server.
- < database >: The database used to store the data to be published.
- < username >: The user name with permission to access the database.
- < password >: The password for the user.
- < styleFile >: The style file path, in JSON format, is used to specify the style of the map. Documents to be followed Mapbox Style Specification.
Configure GeoTrellis Map Service Provider
GeoTrellis map service providers are configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.GeoTrellisMapProvider" enabled="true" name="test">
<config class="com.supermap.services.providers.GeoTrellisMapProviderSetting">
<outputPath>../../webapps/iserver/output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<cacheDisabled>false</cacheDisabled>
<connInfo>
<engineType>HBASE</engineType>
<server>localhost</server>
<dataBase>test</dataBase>
</connInfo>
<mapSettings>
<com.supermap.services.providers.GeotrellisMapSetting>
<mapName>mayimap</mapName>
<layerIds>
<string>SV1-02_20190321</string>
<string>GF2_20160503</string>
</layerIds>
<enableMultiVersion>true</enableMultiVersion>
<versionNames>
<string>T2015</string>
<string>T2016</string>
</versionNames>
</com.supermap.services.providers.GeotrellisMapSetting>
</mapSettings>
</config>
</provider>
The class in < provider > identifies the implementation class of GeoTrellis map service providers, and the class in < config > identifies the configuration class corresponding to the GeoTrellis service provider, that is, GeoTrellisProviderSetting, and the content in < config > corresponds to Configuration items corresponding to GeoTrelli's ProviderSetting:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < cachedisabled >: Enable cache.
- < connInfo >: Data source configuration information.
- < engineType >: Data source engine type, which can be set as GEOTRELLISFILE and GEOTRELLISHDFS.
- < server >: Specific address of data. If engineType is set to GEOTRELLISFILE, fill in the file path; if engineType is set to GEOTRELLISHDFS, fill in the HDFSfile path in the format, hdfs://{ip}:port/test.
- < mapSettings >: Map setting information. Currently, only data source engines with data registration are supported.
- < com.supermap.services.providers.GeotrellisMapSetting <: This node is used to set the information to be published map name, and supports setting more than one.
- < mapName >: The name to be published map name.
- < enableMultiVersion >: whether to enable the multi-version capability. The default value is false.
- < layerids >: Tileset name. When < enableMultiVersion > is set to true, multiple tileset names are supported.
- < versionNames >: List of version names. Only when < enableMultiVersion > is set to true, set this parameter, and the number of settings must be the same as the number of table names set in < layerIds >, and correspond to each other in order.
Note: This provider is only used for raster and image data.
Configure the Multi Tiles Map Provider
The configuration of the multi tiles map provider is done in the < provider > node. There are three combining modes for multi tiles: default, base tileset, and custom scales. Here, take base tileset and custom scales as examples to introduce the configuration of map service providers.
base tileset:
<provider class="com.supermap.services.providers.MultiTilesProvider" enabled="true" name="multiTiles3">
<config class="com.supermap.services.providers.MultiTilesProviderSetting">
<name>ChinaTest</name>
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<tilesets>
<com.supermap.services.components.commontypes.TilesetSetting>
<tilesourceInfo class="com.supermap.services.tilesource.MongoDBTilesourceInfo">
<datastoreType>TILES</datastoreType>
<type>MongoDB</type>
<serverAdresses>
<string>192.168.17.214:27011</string>
</serverAdresses>
<database>jingjin_transparent</database>
<username/>
<password/>
</tilesourceInfo>
<mapName>Map of Beijing Tianjin region</mapName>
<tilesetName>1181328118</tilesetName>
</com.supermap.services.components.commontypes.TilesetSetting>
</tilesets>
<baseTileset>
<tilesourceInfo class="com.supermap.services.tilesource.SMTilesTileSourceInfo">
<datastoreType>TILES</datastoreType>
<outputPath>E:/supermap/China_-1085299276_256X256_PNG.smtiles</outputPath>
</tilesourceInfo>
<mapName>China</mapName>
<tilesetName>smtiles_tileset_1181328119</tilesetName>
</baseTileset>
<combiningMode>BaseTileset</combiningMode>
</config>
</provider>
custom scales:
<provider class="com.supermap.services.providers.MultiTilesProvider" enabled="true" name="multiTiles3">
<config class="com.supermap.services.providers.MultiTilesProviderSetting">
<name>ChinaTest</name>
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<tilesets>
<com.supermap.services.components.commontypes.TilesetSetting>
<tilesourceInfo class="com.supermap.services.tilesource.MongoDBTilesourceInfo">
<datastoreType>TILES</datastoreType>
<type>MongoDB</type>
<serverAdresses>
<string>192.168.17.214:27011</string>
</serverAdresses>
<database>jingjin_transparent</database>
<username/>
<password/>
</tilesourceInfo>
<mapName>Map of Beijing Tianjin region</mapName>
</com.supermap.services.components.commontypes.TilesetSetting>
<com.supermap.services.components.commontypes.TilesetSetting>
<tilesourceInfo class="com.supermap.services.tilesource.MongoDBTilesourceInfo">
<datastoreType>TILES</datastoreType>
<type>MongoDB</type>
<serverAdresses>
<string>192.168.17.214:27011</string>
</serverAdresses>
<database>China4326</database>
<username/>
<password/>
</tilesourceInfo>
<mapName>China_4326</mapName>
</com.supermap.services.components.commontypes.TilesetSetting>
</tilesets>
<customScales>
<double>4.0E-9</double>
<double>8.0E-9</double>
<double>1.5625E-8</double>
<double>3.125E-8</double>
<double>6.25E-8</double>
<double>1.25E-7</double>
<double>2.5E-7</double>
<double>5.0E-7</double>
<double>1.0E-6</double>
</customScales>
<combiningMode>CustomScales</combiningMode>
</config>
</provider>
The class in < provider > identifies the implementation class of the multi tiles map provider, and the class in < config > identifies the configuration class corresponding to the composite tile service provider, that is, MultiTilesProviderSetting, and the content in < config > corresponds to MultiTilesProviderSetting corresponding configuration item:
- < name >: The name of the map service into which multiple map tiles libraries are aggregated and published.
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < tilesets >: Slice sets that need to be published.
- < com.supermap.services.components.commontypes.TilesetSetting >: This node is used to set the information of the slice to be published, and supports the setting of multiple slices.
-
-
- < tilesourceInfo >: Slice data source information, in which class identifies the configuration class corresponding to the multi tilesservice providers.
- < datastoreType >: Datasource type, TILES type is supported.
- < tilesourceInfo >: Slice data source information, in which class identifies the configuration class corresponding to the multi tilesservice providers.
-
File type data source configuration parameters:
-
-
-
- < outputPath >: Slice data source storage path. Supported tile formats include SMTiles, UGCV5, SMTiles etc.
-
-
The database type configuration parameter:
-
-
-
- < type >: Database type, such as MongoDB.
- < Server Adresses >: The service address of the database. For example, the service address of the MongoDB database is "192.168.17.214: 27017".
- < database >: Name.
- < username >: The user name with permission to access the database.
- < password >: The password for the user.
- < mapName >: The name to published map name.
- < tilesetName >: The name of the published slice set.
-
-
- < baseTileset >: underlay slice set settings.
- < custom scales >: Custom scales (0 < scale bar < 1), only support double, such as "0.00001".
- < combiningmode >: Combining mode,supports three merge modes: "Default", "Customizable Scales", and "BaseTile Set".
Configure MBTiles Map Service Provider
The MBTiles service providers is configured in the < provider > node. The specific configuration is as follows:
<provider class="com.supermap.services.providers.MBTilesMapProvider" enabled="true" name="mbtiles-R">
<config class="com.supermap.services.providers.MBTilesMapProviderSetting">
<outputPath>./output</outputPath>
<outputSite>http://{ip}:{port}/iserver/output/</outputSite>
<filePath>D:/R_Boundry.mbtiles</filePath>
<vectorFormat>false</vectorFormat>
</config>
</provider>
The class in < provider > identifies the implementation class of MBTiles map service providers, and the class in < config > identifies the configuration class corresponding to the MBTiles map service provider, that is, the MBTiles Map ProviderSetting, and the content in < config > corresponds to MBTilesMapProviderSetting corresponding configuration item:
- < outputPath >: The output path of the picture.
- < outputSite >: The root URI to access the image.
- < filePath >: Path to the MBTiles file.
- < vectorFormat >: Whether it is vector tiles.
- <returnNoContentStatusWhenNoTileData>: When accessing a non-existent tile data region and level, whether an HTTP status code is returned to indicate that the region is not tile-free. The default is false; in this case, a transparent image will be returned. When set to true, HTTP status code 204 is returned.