configureVehicleRestrictionFilter static method

  1. @Deprecated("Will be removed in v4.28.0, use [MapContentSettings.configureVehicleRestrictionFilterWithTransportSpecification] instead.")
void configureVehicleRestrictionFilter(
  1. TransportMode transportMode,
  2. TruckSpecifications truckSpecifications,
  3. List<HazardousMaterial>? hazardousMaterials,
  4. TunnelCategory? tunnelCategory,
)

Configure a filter for MapFeatures.vehicleRestrictions to show only the restrictions matching the specified criteria when the feature is enabled.

Filtering rules for truck specifications

Only restrictions applicable to the supplied truck specifications will be shown.

Examples:

  • If the height in MapContentSettings.configureVehicleRestrictionFilter.truckSpecifications is set to 200 cm, then height restrictions with a height greater than 200 cm will not be displayed.
  • If the trailer count in MapContentSettings.configureVehicleRestrictionFilter.truckSpecifications is set to 2, then trailer restrictions for a count greater than 2 will not be displayed.

Filtering rules for hazardous materials

Only restrictions applicable to specified hazardous materials will be shown. If at least one hazardous material of any type is present in the list, all available tunnel category restrictions will be displayed. In order to filter-out non-applicable tunnel categories, a tunnel category, that applies to the vehicle, can be specified additionally.

Examples:

  • If the MapContentSettings.configureVehicleRestrictionFilter.hazardousMaterials contains HazardousMaterial.poison and HazardousMaterial.gas, then only material restrictions for poison and gas will be displayed.
  • If the MapContentSettings.configureVehicleRestrictionFilter.hazardousMaterials list is empty, then no material restrictions will be shown.
  • If the MapContentSettings.configureVehicleRestrictionFilter.hazardousMaterials list is not supplied at all (is null), then no material restrictions will be shown.
  • If the MapContentSettings.configureVehicleRestrictionFilter.hazardousMaterials contains at least one hazardous material of any type and MapContentSettings.configureVehicleRestrictionFilter.tunnelCategory is null, then only corresponding material restrictions will be displayed together with all available tunnel categories.

Filtering rules for tunnel category

Tunnel categories are labeled and rated based on the level of restriction they provide. The lowest level of restriction is TunnelCategory.b, the highest and most restrictive one is TunnelCategory.e.

Specifying tunnel category means that:

  • The truck carries goods which could cause only the additional dangerous effects described in specified tunnel category and other categories below it with lower level of restriction.
  • The truck does not carry goods that could cause the dangerous effects described in tunnel categories above with higher restriction levels than the one specified.

Tunnel categories are closely related to hazardous materials.

Since the type of hazardous material alone does not define the exact level of danger, to ensure comprehensive coverage; the HERE SDK follows:

  • If at least one hazardous material is specified but no MapContentSettings.configureVehicleRestrictionFilter.tunnelCategory is provided, the SDK enables and displays all tunnel category restrictions to ensure that no relevant restrictions are omitted.
  • If both hazardous materials and a MapContentSettings.configureVehicleRestrictionFilter.tunnelCategory are specified, the SDK strictly follows the given tunnel category parameter and displays only the applicable restrictions.

Example: If MapContentSettings.configureVehicleRestrictionFilter.tunnelCategory is set to TunnelCategory.d, then restrictions for tunnel category TunnelCategory.e and TunnelCategory.d will be displayed, but not the categories TunnelCategory.b and TunnelCategory.c.

  • transportMode Specifies the current transport type. Currently, it's used to distinguish between truck and other transport modes. This distinction ensures consistency between the routing logic and the information displayed on the map. At present, this is primarily used to suppress the generic truck restriction icon.

  • truckSpecifications The size, weight, type and trailer count specifications to filter for, so that only restrictions which are relevant for the given specifications are displayed.

  • hazardousMaterials The hazardous materials to filter for, so that only applicable restrictions are displayed. When the list is null or empty, then no material restrictions will be displayed.

  • tunnelCategory The tunnel category to filter for, so that only applicable restrictions are displayed. If null, then no tunnel category restrictions will be displayed.

Implementation

@Deprecated("Will be removed in v4.28.0, use [MapContentSettings.configureVehicleRestrictionFilterWithTransportSpecification] instead.")

static void configureVehicleRestrictionFilter(TransportMode transportMode, TruckSpecifications truckSpecifications, List<HazardousMaterial>? hazardousMaterials, TunnelCategory? tunnelCategory) => $prototype.configureVehicleRestrictionFilter(transportMode, truckSpecifications, hazardousMaterials, tunnelCategory);