iserver自带的范例需要下载非deploy包,和iserver-services.xml文件同级目录会有一个iserver-services-sample.xml文件,其中就有相关的一些womeniserver自带的服务范例可以参考。这个是我从我们的范例的xml文件中找到的设定initFacilityAnalyest和directionField的范例,您可以参考一下
<provider class="com.supermap.services.providers.UGCTransportationAnalystProvider" inner-providerNames="ugcDataProvider-Changchun" name="transportationAnalystProvider-Changchun"> <config class="com.supermap.services.providers.TransportationAnalystSetting"> <workspaceConnectString>../../samples/data/NetworkAnalyst/Changchun.sxwu</workspaceConnectString> <!-- 交通换乘分析允许的最大并发数。该值一般不应大于系统CPU核数的一半,不设置或值为0时,iServer会在启动时根据CPU核数动态设置。 <poolSize>0</poolSize> --> <datasourceName>Changchun</datasourceName> <datasetName>RoadNet</datasetName> <ruleField>TRule</ruleField> <forwardSingleWayRuleValues> <string>FT</string> </forwardSingleWayRuleValues> <backwardSingleWayRuleValues> <string>TF</string> </backwardSingleWayRuleValues> <twoWayRuleValues> <string>twoWay</string> </twoWayRuleValues> <prohibitedWayRuleValues> <string>prohibit</string> </prohibitedWayRuleValues> <edgeIDField>SmEdgeID</edgeIDField> <edgeNameField>RoadName</edgeNameField> <nodeIDField>SmNodeID</nodeIDField> <nodeNameField>SmNodeID</nodeNameField> <fromNodeIDField>SmFNode</fromNodeIDField> <toNodeIDField>SmTNode</toNodeIDField> <tolerance>500.0</tolerance> <weightFieldInfos> <com.supermap.services.components.commontypes.WeightFieldInfo> <name>length</name> <forwardWeightField>Length</forwardWeightField> <backWeightField>Length</backWeightField> </com.supermap.services.components.commontypes.WeightFieldInfo> <com.supermap.services.components.commontypes.WeightFieldInfo> <name>time</name> <forwardWeightField>FT_TIME</forwardWeightField> <backWeightField>TF_TIME</backWeightField> </com.supermap.services.components.commontypes.WeightFieldInfo> </weightFieldInfos> <turnDatasetInfo> <workspaceConnectString>../../samples/data/NetworkAnalyst/Changchun.sxwu</workspaceConnectString> <datasourceName>Changchun</datasourceName> <datasetName>RoadNet_TURN</datasetName> <nodeIDField>NodeID</nodeIDField> <fromEdgeIDField>FEdgeID</fromEdgeIDField> <toEdgeIDField>TEdgeID</toEdgeIDField> <weightFields> <string>TurnCost</string> </weightFields> </turnDatasetInfo> <initFacilityAnalyst>true</initFacilityAnalyst> <directionField>SmResistanceA</directionField> </config> </provider>