Click or drag to resize

RouteGetConstraints Method (LatLon, Boolean)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Return a list of ConstraintLinks for the given link location.

Namespace:  Telogis.GeoBase.Routing
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public List<ConstraintLinks> GetConstraints(
	LatLon latLon,
	bool validOnly
)

Parameters

latLon
Type: Telogis.GeoBaseLatLon
The LatLon specifying the location of the link; it needs to be the first point on the StreetLink.
validOnly
Type: SystemBoolean
If true, will only return constraints valid to the vehicle (VehicleSpec), and route time.

Return Value

Type: ListConstraintLinks
A list of ConstraintLinks describing the constraints for the given location.
Remarks
The first argument to this method should be a LatLon describing the first point of the StreetLink. This can be attained with the FirstPoint property, as shown in the code example below.
Examples
...

// Create the location and Route that we want to query
LatLon myLoc = new LatLon(33.708480, -117.851811);
Route myRoute = new Route();

// We need to find the first point on the StreetLink. This is achieved by 
// reverse geocoding 'myLoc', and then using its 'StreetLink.FirstPoint' property as the first argument to GetConstraints.
GeoCodeFull gcf = GeoCoder.ReverseGeoCodeFull(myLoc);
List<ConstraintLinks> constraints = myRoute.GetConstraints(gcf.StreetLink.FirstPoint, false);

...
See Also