we would like to get the TruckAttributes and TrafficIncidents in a specific language.
Therefore, we have set the language property of the common element in the XMapProfile.
But the ToolTips of the Traffic Incidents and Truck Attributes are not returned in the specified language!
We are using the following code to add a Truck attribute layer:
Code: Select all
var truckAttributesLayer = new XMapLayer("TruckAttributes", xmapMetaInfo.Url, xmapMetaInfo.User, xmapMetaInfo.Password) {
CustomCallerContextProperties = new xserver.CallerContextProperty[] {
new xserver.CallerContextProperty {
key = "ProfileXMLSnippet",
value = "<?xml version='1.0' encoding='us-ascii'?><Profile xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Common language='it' majorVersion='1' minorVersion='0' /><FeatureLayer majorVersion='1' minorVersion='0'><GlobalSettings enableTimeDependency='true' /><Themes><Theme id='PTV_TrafficIncidents' priorityLevel='0' /><Theme id='PTV_TruckAttributes' enabled='true' priorityLevel='0' /><Theme id='PTV_RestrictionZones' enabled='true' priorityLevel='0' /><Theme id='PTV_SpeedPatterns' enabled='true' priorityLevel='0' /></Themes></FeatureLayer></Profile>"
}
},
CustomXMapLayers = new xserver.Layer[] {
new xserver.FeatureLayer {
name = "PTV_TruckAttributes",
visible = true,
objectInfos = xserver.ObjectInfoType.REFERENCEPOINT
}
}
};
Code: Select all
var trafficLayer = new XMapLayer("Traffic", xmapMetaInfo.Url, xmapMetaInfo.User, xmapMetaInfo.Password) {
CustomCallerContextProperties = new xserver.CallerContextProperty[] {
new xserver.CallerContextProperty {
key = "ProfileXMLSnippet",
value = "<?xml version='1.0' encoding='us-ascii'?><Profile xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Common language='it' majorVersion='1' minorVersion='0' /><FeatureLayer majorVersion='1' minorVersion='0'><GlobalSettings enableTimeDependency='true' /><Themes><Theme id='PTV_TrafficIncidents' enabled='true' priorityLevel='0' /><Theme id='PTV_TruckAttributes' priorityLevel='0' /><Theme id='PTV_RestrictionZones' priorityLevel='0' /><Theme id='PTV_SpeedPatterns' priorityLevel='0' /></Themes></FeatureLayer></Profile>"
}
},
CustomXMapLayers = new xserver.Layer[] {
new xserver.SMOLayer() {
name = "traffic.ptv-traffic",
objectInfos = xserver.ObjectInfoType.REFERENCEPOINT,
visible = true
}
},
MaxRequestSize = xmapMetaInfo.MaxRequestSize
};
And the Traffic messages are returned in the wrong language by the xMap Server.
Best regards,
Martin