SuperMap iServer supports the following types of map providers:
Configuring local map service provider
Configure a UGC map service provider as shown below:
<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>4.0</cacheVersion> <useCompactCache>false</useCompactCache> <multiThread>true</multiThread> <!-- Whether to disable the expanded query range function --> <inflatDisabled>true</inflatDisabled;> <poolSize>0</poolSize> <preferedPNGType>PNG</preferedPNGType> <queryExpectCount>1000</queryExpectCount> <leftTopCorner> <x>-180.0</x> <y>90.0</y> </leftTopCorner> <!-- Set the 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 attribute in <provider> represents the implementation class of the UGC service provider, the class attribute in the <config> represents the configuration class of UGC service provider, that is UGCMapProviderSetting, and the contents of <config> are the configuration items of UGCMapProviderSetting as follows:
- <inflatDisabled>: Whether to disable the expanded query range function for dynamically output map. When browsing a tiled map, it is recommended to set it to false, that is, to expand the scope of the query to ensure that the splicing of adjacent tiles is normal and the map is complete. While when browsing a non-tiled map, in order to improve the performance of output map, it is recommended to set it to true, that is, to disable the extended query function, you only need to browse the required range of the map area.
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <workspacePath>: This service provider's workspace path. If it has a password, for instance supermap, then write like this:
<workspacePath>server=../samples/data/World/World.sxwu;password=supermap</workspacePath>
In addition, the workspace path supports reading from environment variables and system configuration files. It can be written as:
<workspacePath>server=${datapath1}/World.sxwu;password=supermap</workspacePath>
For details, see: Presetting local workspace path- <cacheVersion>: Used to specify the dynamic cache version, default is 4.0. Currently supported cache version, see: SuperMap cache strategy. If here needs to be compatible with simple cache generated by SuperMap iServer 2008, set the cache version to 3.1.
- <ignoreHashcodeWhenUseCache>: Whether to ignore hashcode when reading original cache, default is false. The parameter supports 4.0 and 5.0 cache version.
- <useCompactCache>: Whether to use the compact format cache, default is false. Currently, only the 5.0-version cache supports this parameter.
- <multiThread>: Whether to use multiple threads, default is true.
- <poolSize>: The size of thread pool. For details, seel: Service provider's configuration parameter description.
- <preferedPNGType>: The prefered image format is PNG when using PNG cache, now supports PNG and PNG8. If the value is null, it will use PNG by default. For details, see: Service provider's configuration parameter description.
- <queryExpectCount>: The number of query results returned by server, default is 1000.
- <leftTopCorner>: The starting point of left top corner when outputting the map tiles. The default is left top corner coordinate of a map.
- <cacheDisabled>: Whether to disable the cache, default is no. Image output parameters can also set if use cache or not. When there is a conflict, disabling is preferred. For details, see: Service provider's configuration parameter description.
- <excludedFieldsInMaps>: Used to set the exclusion fields, this parameter is optional. The administrator can exclude the fields of the specified layer as needed, and the excluded fields will not be visible when the user performs a map query operation.
Where, com.supermap.services.providers.ExcludedFieldsInMap and com.supermap.services.providers.ExcludedFieldsInLayer are the implementation class for exclusion fields. <mapName> is the map name, <layerName> is the name of dataset, <excludedFields> is the fields you want to exclude.
SuperMap iServer also supports Oracle and SQL Server database workspaces as the service provider. Table1 shows the parameters need to be set. If there are no special instructions, the two types both need these parametesr.
Table 1. The parameters for setting database workspace information
Parameter name | Description |
type | The workspace type. Currently, the supported database workspaces are the Oracle workspace and the SQL Server workspace. Their values are ORACLE and SQL. ORACLE represents that the workspace is saved in the oracle database, And the SQL represents that the workspace is saved in the SQL Server database. |
name | The name of the workspace in the database. |
username | The user name used to login database. |
password | The password used to login database. |
server | The server name. For the Oracle database, the server name is the TNS server name; For the SQL Server database, the server name is the Database System Name. |
database | The database name. |
driver | The driver name when using the ODBC connection. Only SQL Server database uses the ODBC connection, the driver name can be SQL Server or SQL Native Client. |
- The <workspacePath> written format of the data source provided by Oracle database is as follows:
<workspacePath>type=ORACLE;name=testOralce;username=cq;password=cq;server=ISERVER;database=iserver</workspacePath>
- The <workspacePath> written format of the data source provided by SQL database is as follows
<workspacePath>type=SQL;name=testSQL;username=sa;password=iserver;server=ISERVICE\SQL2005;driver= SQL Server;database=iserver</workspacePath>
In addition, multiple <provider>can be bound as a whole, namely, as a <providerSet> to provide services to <component>. See Configuring Service Provider Sets through XML File. The structure of <provider> and <providerSet> in the configuration file is shown as follows:
<server> ... <application> ... <providerSets> ... <providerSet> ... </providerSet> </providerSets> <providers> ... <provider> ... </provider> </providers> </application> </server>
Configuring REST map service provider
The configuration of REST ServiceProvider is in <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 attribute in <provider> represents the implementation class of the REST service provider, the class attribute in the <config> represents the configuration class of REST service provider, that is RESTMapProviderSetting, and the contents of <config> are the configuration items of RESTMapProviderSetting as follows:
- <restServiceRootURL>: REST map service address, pointing to the root resource path of the service, e.g., http://localhost:8090/iserver/services/map-china400/rest.
- <useCache>: Whether to use cache, default is true. When enabling cache, REST requests for accessing resources with the responses will be stored in local for later use when receiving the same requests again.
- <restProviderCacheConfig>: Settings for storing the historical cached requests in memory, including:
- <maxElementsInMemory>: The maximum of request records allowed in memory. 0 means no limitation; 1 means do not use memory to cache, default is 1. If not 1, the priority is to store the request record in memory.
- <maxSizeOnDisk>: The maximum allocated disk capacity. The unit is MB, the default size is 2048 MB.
- <timeToLiveSeconds>: Used to set the upper limit for the survival of the cache, when time's up, the cache will be removed. Timing starts from the creation of the record, the unit is second. The default is 0, means permanent survival.
- <timeToIdleSeconds>: Used to set the upper limit for the idle time of the cache, when time's up, the cache will be removed. Timing starts from last access time, the unit is second. The default is 0, means permanent survival.
- <token>: When enabling security machanism, accessing the protected REST resources requires Token .
Configuring SuperMap Cloud map service provider
The configuration of SuperMap Cloud service provider is in <provider>node. The configuration detail is shown as below:
<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 attribute in <provider> represents the implementation class of the SuperMap Cloud map service provider, the class attribute in the <config> represents the configuration class of SuperMap Cloud service provider, that is CloudMapProviderSetting, and the contents of <config> are the configuration items of CloudMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <servicesUrl>: The image output service address of remote SuperMap Cloud map service. If the user sets servicesUrl, then it will use the set service address, otherwise it will use the default: http://t0.supermapcloud.com/FileService/image.
- <cacheEnabled>: Whether to cache tiles to local machine. If true, cache will be generated when accessing published service, which can improve the follow-up visits speed. The default is true.
Configuring FastDFS map service provider
The configuration of FastDFS service provider is in <provider>node. The configuration detail is shown as below:
<provider class="com.supermap.services.providers.FastDFSTileProvider" enabled="true" name="fastDfs"> <config class="com.supermap.services.providers.FastDFSTileProviderSetting"> <fdfsTrackers> <string>192.168.112.251:22122</string> </fdfsTrackers> <fdhtGroups> <string-array> <string>192.168.112.250:11411</string> </string-array> </fdhtGroups> </config> </provider>
The class attribute in <provider> represents the implementation class of the FastDFS service provider, the class attribute in the <config> represents the configuration class of FastDFS service provider, that is FastDFSTileProviderSetting, and the contents of <config> are the configuration items of FastDFSTileProviderSetting as follows:
- <fdfsTrackers>: FastDFS Trackers service address.
- <fdhtGroups>: FastDHT Groups service address.
- <mapName>: Used to set the name of the map to be published, if not set, it will publish all the maps stored in current location.
- <tilesetName>: The name of the tiles set to be published, which doesn't need to be set manually.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring GDP map service provider
The configuration of GDP map service provider is in <provider> node. The configuration detail is shown as below:
<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 attribute in <provider> represents the implementation class of the GDP service provider, the class attribute in the <config> represents the configuration class of GDP service provider, that is DPMapProviderSetting, and the contents of <config> are the configuration items of GDPMapProviderSetting as follows:
- <filesPath>: The GDP tile package's path.
- <cacheVersion>: The tile version.
- <dpi>: The DPI of the tile, default is 96.
- <tileSize>: Tile size, default is 256.
- <zoom0ScaleDenator>: The 0 level scale denominator, default is 5.916587109091312E8.
- <bounds>: The map bound, default is: -20037508.3427892440,-20037508.3427892440,20037508.3427892440,20037508.3427892440.
- <format>: Tile format, e.g., png.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring MongoDB map service provider
The configuration of MongoDB service provider is in <provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the MongoDB service provider, the class attribute in the <config> represents the configuration class of MongoDB service provider, that is MongoDBTileProviderSetting, and the contents of <config> are the configuration items of MongoDBTileProviderSetting as follows:
- <serverAdresses>: MongoDB server's address.
- <mapName>: Used to set the name of the map to be published, if not set, it will publish all the maps stored in current location.
- <tilesetName>: The name of the tiles set to be published, which doesn't need to be set manually.
- <database>: The database used to store these map tiles. Default to use the database named "smtiles".
- <username>: The name of the user who have the permission to access dababase.
- <password>: The password of the user.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring MongoDB MVT map service provider
The configuration of MongoDB MVT service provider is in <provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the MongoDB MVT service provider, the class attribute in the <config> represents the configuration class of MongoDB MVT service provider, that is MongoDBTileProviderSetting, and the contents of <config> are the configuration items of MongoDBTileProviderSetting as follows:
- <serverAdresses>: MongoDB server's address.
- <mapName>: Used to set the name of the map to be published, if not set, it will publish all the maps stored in current location.
- <tilesetName>: The name of the tiles set to be published, which doesn't need to be set manually.
- <database>: The database used to store these map tiles. Default to use the database named "smtiles".
- <username>: The name of the user who have the permission to access dababase.
- <password>: The password of the user.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring OTS map service provider
The configuration of OTS service provider is in <provider> node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the OTS service provider, the class attribute in the <config> represents the configuration class of OTS service provider, that is OTSTileProviderSetting, and the contents of <config> are the configuration items of OTSTileProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <nodeName>: The name of Alibaba cloud node. This means where you want to create the instance.
- <instanceName>: The instance name which is created by Alibaba cloud management console.
- <accessKeyId>: AccessKeyId applied from "management console" in Alibaba cloud official website.
- <accessKeySecret>: AccessKeySecret applied from "management console" in Alibaba cloud official website.
- <fromPublic>: Whether to access the OTS service by its public address or private address. The public access address is: http://<instanceName>.<nodeName>.ots.aliyuncs.com. The private access address is: http://<instanceName>.<nodeName>.ots-internal.aliyuncs.com.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring SMTiles map service provider
The configuration of SMTiles service provider is in<provider> node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the SMTiles map service provider, the class attribute in the <config> represents the configuration class of SMTiles map service provider, that is SMTilesMapProviderSetting, and the contents of <config> are the configuration items of SMTilesMapProviderSetting as follows:
- <filePath>: SMTiles cache file path. This cache file can be generated by SuperMap iServer and iEdge.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring SVTiles map service provider
The configuration of SVTiles service provider is in <provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the SVTiles map service provider, the class attribute in the <config> represents the configuration class of SVTiles map service provider, that is SVTilesMapProviderSetting, and the contents of <config> are the configuration items of SVTilesMapProviderSetting as follows:
- <filePath>: SVTiles cache file path. This cache file can be generated by SuperMap iServer and iEdge.
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false. For details, see: Configuring UGCV5 map service provider.
Configuring UGCV5 map service provider
The configuration of UGCV5 service provider is in <provider>node.The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the UGCV5 service provider, the class attribute in the <config> represents the configuration class of UGCV5 service provider, that is UGCV5TileProviderSetting, and the contents of <config> are the configuration items of UGCV5TileProviderSetting as follows:
- <configFile>: The configuration file or index file of SuperMap UGC tiles (*.sci or *.inf).
- <watermark>: Used to set whether the resulting published tiles have watermarks (the types added include pictures and texts). Defaults to false.
- <imageUrl>: The image path.
- <imageAlpha>: The transparency of the image. Range: 0->1. Default: 0.8
- <txtContent>: Text content.
- <fontSize>: The size of the text. Default: 20
- <fontColor>: The color of the text. Default: 100,100,100,128
- <fontStyle>: The text type. Default: Dialog
- <xIndex>: x position of the watermark. Default is the x value of the tile center
- <yIndex>: y position of the watermark. Default is the y value of the tile center
- <random>: The probability of each tile showing a watermark. Range: 1—>100. Default: 25
Configuring WMS map service provider
The configuration of WMS service provider is in <provider>node:
<!-- WMS map service provider example, using remote WMS service as data source.--> <provider name="wmsMapProvider" class="com.supermap.services.providers.WMSMapProvider"> <config class="com.supermap.services.providers.WMSMapProviderSetting"> <serviceRootURL>http://localhost:7070/geoserver/wms</serviceRootURL> <username></username> <password></password> <version>1.1.1</version> <reverseLayerOrder>false</reverseLayerOrder> </config> </provider>
The class attribute in <provider> represents the implementation class of the WMS service provider, the class attribute in the <config> represents the configuration class of WMS service provider, that is WMSMapProviderSetting, and the contents of <config> are the configuration items of WMSMapProviderSetting as follows:
- <serviceRootURL>: The root directory of WMS service.
- username: WMS-service-authorized username(optional).
- password: WMS-service-authorized password(optional).
- version: WMS service version.
- reverseLayerOrder: Whether to invert the order of layers.
Configuring WMTS Map Service Provider
The configuration of WMTS service provider is in <provider>node:
<!-- WMTS map service provider example, using remote WMTS service as 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> </config> </provider>
The class attribute in <provider> represents the implementation class of the WMTS service provider, the class attribute in the <config> represents the configuration class of WMTS service provider, that is WMTSMapProviderSetting, and the contents of <config> are the configuration items of WMTSMapProviderSetting as follows:
- <serviceRootURL>: The root directory of WMTS service.
- username: WMTS-service-authorized username(optional).
- password: WMTS-service-authorized passoword(optional).
- version: WMTS service version (Currently, 1.0.0 version is supported).
- dpi: The dpi of the WMTS service source.
- layers: The layer set of WMTS service.
- reverseTopLeftCorner: iServer uses this default rule to parse the TopLeftCorner element in TileMatrixSet: If TileMatrixSet uses geographic coordinate system, and SupportedCRS of TileMatrixSet uses EPSG namespace, iServer will parse TopLeftCorner in the order of Y,X; on any other conditions, iServer parses TopLeftCorner in the order of X,Y. If the TopLeftCorner of WMTS service being used does not satisfy this rule, then reverseTopLeftCorner should be filled with the Identifier value of the corresponding TileMatrixSet, showing that the TopLeftCorner of TileMatrixSet is parsed in the opposite order of the default rule. In the above example, the tileMatrixSet whose Identifier is EPSG:4610, the SupportedCRS is urn:ogc:def:crs:EPSG::4610, but in geoserver the TopLeftCorner is in the order of XY, which is oppoiste to the default parsing rule of iserver, so here we need add the Identifiler of tileMatrixSet of this layer.
- cacheEnabled: Whether to cache in local machine, default is true.
- resolutions: The resolutions of different levels of WMTS service (optional), which is in consistent of TileMatrix in the chosen scale set, the adjacent resolutions are separated with comma.
- reverseBoundingBox: Set the crs collection of BoundingBox to parse in reverse order. Use comma "," to separeate between multiple crs. After setting this parameter, it will parse BoundingBox in the order of YX.
Configuring Bing Maps map service provider
The configuration of Bing Maps service provider is in <provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the Bing Maps service provider, the class attribute in the <config> represents the configuration class of Bing Maps service provider, that is BingMapsMapProviderSetting, and the contents of <config> are the configuration items of BingMapsMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <apiKey>: Key authorized by Bing Maps, used to access Bing Maps map service.
- <bingmapsRootUrl>: Remote Bing Maps map service's image output service address.
- <imagerySet>: Bing Maps' map set name. BingMaps provides several data sets: "Aerial", "AerialWithLables", "Birdseye", "BirdseyeWithLables", "Road", each corresponding to different types of map service.
- <mapVersion>: Bing Maps' map version, such as "v0", "v1".
- <cacheEnabled>: Whether to cache tiles to local machine. If true, cache will be generated when accessing published service, which can improve the follow-up visits speed. The default is true.
Configuring Google Maps map service provider
The configuration of Google map service provider is in <provider> node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the Google map service provider, the class attribute in the <config> represents the configuration class of Google service provider, that is GoogleMapsMapProviderSetting, and the contents of <config> are the configuration items of GoogleMapsMapProviderSetting as follows:
- <googleMapClientID>: The account who has the permission to access Google Maps.
- <googleMapCryptoKey>: The private key of the account.
- <googleMapLanguage>: The language the text label uses in the map.
- <googleMapWidth>: The width of tile you request in pixel. Every tile has a Google watermark, so you can set it larger to reduce the mark density. But if the value is too big, it will effect the efficiency. So you need set a proper value according to your hardware and software and network conditions.
- <googleMapHeight>: The height of tile you request in pixel. In general , it is equal to width of tile.
- <googleProxyAddress>: The proxy address to access Google Maps. If you can't access Google Maps normally, you need configure this parameter.
- <googleProxyPort>: The proxy port to access Google Maps.
Configuring BaiduMap map service provider
The configuration of BaiduMap map service provider is in<provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the BaiduMap map service provider, the class attribute in the <config> represents the configuration class of BaiduMap map service provider, that is BaiduMapProviderSetting, and the contents of <config> are the configuration items of BaiduMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <mapUrl>: Address template for obtaining map tiles, where {x},{y},{z} represents the column number, row number, and level respectively. For example: http://online0.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=pl
- <mapName>: Customized map name. When configures mapUrl without setting this parameter, it will use "baidu" by default.
- <cacheEnabled>: Whether to cache tiles to local machine. If true, cache will be generated when accessing published service, which can improve the follow-up visits speed. The default is true.
Configuring OpenStreetMap map service provider
The configuration of OpenStreetMap map service provider is in <provider> node. The configuration detail is shown below:
<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> </config> </provider>
The class attribute in <provider> represents the implementation class of the OpenStreetMap map service provider, the class attribute in the <config> represents the configuration class of OpenStreetMap service provider, that is OpenStreetMapProviderSetting, and the contents of <config> are the configuration items of OpenStreetMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <mapUrl>: Address template for obtaining map tiles, where {x},{y},{z} represents the column number, row number, and level respectively. For example: http://a.tile.openstreetmap.org/{z}/{x}/{y}.png.
- <mapName>: Customized map name. When configures mapUrl without setting this parameter, it will use "OSM" by default.
- <cacheEnabled>: Whether to cache tiles to local machine. If true, cache will be generated when accessing published service, which can improve the follow-up visits speed. The default is true.
Configuring Tianditu map service provider
The configuration of MapWorld service provider is in<provider>node. The configuration detail is shown below.
<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 attribute in <provider> represents the implementation class of the Tianditu service provider, the class attribute in the <config> represents the configuration class of Tianditu service provider, that is TiandituMapProviderSetting, and the contents of <config> are the configuration items of TiandituMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <servicesUrl>: Remote Tianditu map service's image output service address. The format is: http://t<number >.tianditu.gov.cn, where the number value range is 0-7. If servicesUrl is not set, it will randomly choose one number from 0-7 to build service address.
- <cacheEnabled>: Whether to cache tiles to local machine. If true, cache will be generated when accessing published service, which can improve the follow-up visits speed. The default is true.
- <key>: Token string requried for calling Tianditu API and service interface.
Configuring ArcGIS REST map service provider
The configuration of ArcGIS REST Service provider is in <provider>node. The configuration detail is shown below.
<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> </config> </provider>
The class attribute in <provider> represents the implementation class of the ArcGIS REST map service provider, the class attribute in the <config> represents the configuration class of ArcGIS REST map service provider, that is ArcGISRestMapProviderSetting, and the contents of <config> are the configuration items of ArcGISRestMapProviderSetting as follows:
- <restServiceRootURL>: ArcGIS REST service address.
- <token>: Used to access permission-restricted services. If the service enables security control, and the security authentication mode is "Token", then you need to provide token string.
- <httpReferer>: Http Referer string used to access permission-restricted services. If the service enables security control, and the security authentication mode is "Token", and HTTP Referer is taken for generating token, then you need to set this parameter.
Configuring TPK map service provider
The configuration of TPK service provider is in <provider> node. The configuration method is shown below:
<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 attribute in <provider> represents the implementation class of the TPK map service provider, the class attribute in the <config> represents the configuration class of TPK map service provider, that is TPKMapProviderSetting, and the contents of <config> are the configuration items of TPKMapProviderSetting as follows:
- <tilePackagePath>: TPK file path.
Configuring GeoPackage map service provider
The configuration of GeoPackage service provider is in<provider>node. The configuration method is shown below:
<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 attribute in <provider> represents the implementation class of the GeoPackage map service provider, the class attribute in the <config> represents the configuration class of GeoPackage map service provider, that is GeoPackageMapProviderSetting, and the contents of <config> are the configuration items of GeoPackageMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <filePath> :GeoPackage file path.
- <defaultMapPrjCoordSys>: The default map projection for publishing GeoPackage file as map service.
- <queryExpectCount>: The number of resulting queries expected to be returned, default is 1000 .
- <axisPositiveDirection>: The positive direction of the axis, including RightDown and RightUp. The default value is RightDown.
- <originalPoint>: The origin point for cutting map. The format is {x},{y}.
Configuring ZXYTiles map service provider
The configuration of ZXYTiles service provider is in <provider> node. The configuration method is shown below:
<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 attribute in <provider> represents the implementation class of the ZXYTiles map service provider, the class attribute in the <config> represents the configuration class of ZXYTiles map service provider, that is ZXYTilesMapProviderSetting, and the contents of <config> are the configuration items of ZXYTilesMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <filePath>: The path of ZXYTiles file.
Configuring ArcGIS cache map service provider
The configuration of ArcGIS service provider is in <provider> node. The configuration method is shown below:
<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 attribute in <provider> represents the implementation class of the ArcGIS cache map service provider, the class attribute in the <config> represents the configuration class of ArcGIS cache service provider, that is ArcGISCacheMapProviderSetting, and the contents of <config> are the configuration items of ArcGISCacheMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <filePath>: The path of ArcGIS cache configuration file(*.xml or *.cdi).
Configuring 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 attribute in <provider> represents the implementation class of the UGCV5(MVT) map service provider, the class attribute in the <config> represents the configuration class of UGCV5(MVT) service provider, that is MVTTileProviderSetting, and the contents of <config> are the configuration items of MVTTileProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <configFilePath>: The UGCV5(MVT) cache file (*sci) path.
Configuring Shape map service provider
The configuration of a Shape map service provider is shown below:
<provider class="com.supermap.services.providers.ShapeFileMapProvider" enabled="true" name="shpMap-shp"> <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 attribute in <provider> represents the implementation class of the Shape map service provider, the class attribute in the <config> represents the configuration class of Shape map service provider, that is ShapeFileMapProviderSetting, and the contents of <config> are the configuration items of ShapeFileMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <cacheDisabled>: Whether to disable caching function.
- <shpDir>: The Shape file path.
- <charset>: The encoding format of the Shape file.
- <styleFile>: The style file path, the file format is JSON, used to specify the style of the map and it must follow the Mapbox Style specification.
Configuring PostGIS map service provider
The configuration of PostGIS map service provider is in <provider>node. The configuration detail is shown below:
<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 attribute in <provider> represents the implementation class of the PostGIS map service provider, the class attribute in the <config> represents the configuration class of PostGIS service provider, that is PostgisMapProviderSetting, and the contents of <config> are the configuration items of PostgisMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <cacheDisabled>: Whether to disable caching function.
- <dbType>: Database type.
- <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 name of the user who have the permission to access dababase.
- <password>: The password of the user.
- <styleFile>: The style file path, the file format is JSON, used to specify the style of the map and it must follow the Mapbox Style specification.
Configuring HBase map service provider
The configuration of HBase map service provider is in <provider>node. The configuration detail is shown below:
<provider class="com.supermap.services.providers.HBaseMapProvider" enabled="true" name="map-hbase"> <config class="com.supermap.services.providers.HBaseMapProviderSetting"> <outputPath>./output</outputPath> <outputSite>http://{ip}:{port}/iserver/output/</outputSite> <styleFile>E:/data/styles/style.json</styleFile> <cacheDisabled>false</cacheDisabled> <catalog>postgis</catalog> <zookeepers>192.168.17.212:2181</zookeepers> <threadsPerCore>8</threadsPerCore> <!-- Set the datasource, dataset info to be published --> <filterDatasource> <com.supermap.services.providers.FilteredDatasourceInfo> <datasourceName>Hbase</datasourceName> <includedDatasetNames> <string>newyorkRoads_L</string> </includedDatasetNames> </com.supermap.services.providers.FilteredDatasourceInfo> </filterDatasource> </config> </provider>
The class attribute in <provider> represents the implementation class of the HBase map service provider, the class attribute in the <config> represents the configuration class of HBase service provider, that is HBaseMapProviderSetting, and the contents of <config> are the configuration items of HBaseMapProviderSetting as follows:
- <outputPath>: Image output path.
- <outputSite>: The root directory for accessing images.
- <styleFile>: The style file path, the file format is JSON, used to specify the style of the map and it must follow the Mapbox Style specification.
- <cacheDisabled>: Whether to disable caching function.
- <catalog>: The storage directory of Hbase data.
- <zookeepers>: zookeeper address, you can set multiple values, separated by commas.
- <threadsPerCore>: Sets the number of threads per core when drawing a map in parallel. The default value is 8.
- <filterDatasource>: Datasource info.
- <com.supermap.services.providers.FilteredDatasourceInfo>: This node is the implementation class for setting the datasource information to be published. Among them, you can set the datasource name and the dataset name and other information. Administrators can select partial datasets to publish as needed. Specifically, the parameters can be set as follows:
- <datasourceName>: The name of the datasource.
- <includedDatasetNames>: Select the list of datasets to be published.