I need help with service area, when I run get supportetTravelModes I get this object:
name: 'Driving_Minutes',
id: '1',
type: 'AUTOMOBILE',
description:
'Collection of network dataset settings that define actions that are allowed on the network and how the actions can be performed.',
timeAttributeName: 'Minutes',
distanceAttributeName: 'Meters',
impedanceAttributeName: 'Minutes',
restrictionAttributeNames: ['Block', 'Oneway', 'Turn'],
attributeParameterValues: [
{
attributeName: 'Block',
parameterName: 'Restriction Usage',
value: 'Prohibited',
},
{
attributeName: 'Oneway',
parameterName: 'Restriction Usage',
value: 'Prohibited',
},
{
attributeName: 'Turn',
parameterName: 'Restriction Usage',
value: 'Prohibited',
},
],
useHierarchy: true,
uturnAtJunctions: 'esriNFSBAllowBacktrack',
simplificationTolerance: null,
simplificationToleranceUnits: 'esriMeters',
but then when I try to put that object as my service area parameter I get the following errors:
Type '"AUTOMOBILE"' is not assignable to type '"automobile" | "truck" | "walk" | "other" | undefined'. Did you mean '"automobile"'?
Type '"esriNFSBAllowBacktrack"' is not assignable to type '"allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections" | undefined'.ts(2322)
Type 'null' is not assignable to type 'number | undefined'.ts(2322)
Type '"esriMeters"' is not assignable to type '"kilometers" | "miles" | "meters" | "centimeters" | "decimal-degrees" | "decimeters" | "feet" | "inches" | "millimeters" | "nautical-miles" | "points" | "unknown" | "yards" | undefined'. Did you mean '"decimeters"'?ts(2820)
and if I do change them all to the types they suggest(AUTOMOBILE -> automobile...), my service gives me an error that it cannot recognice automobile, meteres and allow-trackbacks, any help I'm stuck