Configuring 3D service provider |
SuperMap iServer supports the following types of 3D providers:
Configure a local 3D service provider as illustrated below:
<!-- UGC 3D service provider--> <provider class="com.supermap.services.providers.UGCRealspaceProvider" name="3DProvider"> <config class="com.supermap.services.providers.UGCRealspaceProviderSetting"> <workspacePath>../../samples/data/Realspace/RealspaceSample.sxwu</workspacePath> <xmlParse>false</xmlParse> </config> </provider>
Where the class of <provider> identifies the implementation class of the UGC 3D service provider, the class of <config> identifies the UGCRealspaceProviderSetting, and the content of <config> is its corresponding configuring items:
<workspacePath> represents the path of the workspace used by the service provider. In addition, the workspace path supports reading from environment variables and system configuration files. It can be written as:
<workspacePath>${datapath1}/World.sxwu</workspacePath>For details, see: Presetting local workspace path
Configure a REST 3D service provider as illustrated below:
<!-- REST 3D service provider--> <provider class="com.supermap.services.providers.RestRealspaceProvider" enabled="true" name="rest3DProvider-test"> <config class="com.supermap.services.providers.RestRealspaceProviderSetting"> <restServiceRootURL>http://localhost:8090/iserver/services/3D-sample/rest</restServiceRootURL> <restProviderCacheConfig> <maxElementsInMemory>1</maxElementsInMemory> <maxSizeOnDisk>2048</maxSizeOnDisk> <timeToLiveSeconds>0</timeToLiveSeconds> <timeToIdleSeconds>0</timeToIdleSeconds> </restProviderCacheConfig> <useCache>true</useCache> </config> </provider>
Where the class of <provider> identifies the implementation class of the REST 3D service provider, the class of <config> identifies the RestRealspaceProviderSetting, and the content of <config> is its corresponding configuring items:
Configure a MongoDB 3D service provider, as shown below:
<!-- MongoDB 3D service provider--> <provider class="com.supermap.services.providers.MongoDBRealspaceProvider" enabled="true" name="mongoDB3DProvider-scene"> <config class="com.supermap.services.providers.MongoDBRealspaceProviderSetting"> <serverAdresses> <string>192.168.120.47:27017</string> </serverAdresses> <database>smtiles</database> <username>iserver</username> <password>iserver</password> <tilesetNames> <string>1181328118</string> </tilesetNames> </config> </provider>
Where the class identifies the implement class of MongoDB 3D service provider in <provider>. The class identifies the configuration class of MongoDB 3D service provider in<config>, namely, the MongoDBRealspaceProviderSetting, the contents in <config> are corresponding configuration items, including: