[[Source_Code_ServicesEditionSample_RoutingExtension_RoutingTolerance_CS_100825.zip|View Source]]
{{filehistory:ServicesEditionSample_RoutingExtension_RoutingTolerance_CS_100825.zip|C# Download}}
[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]]
\\
[[Map Suite Samples Alternate Languages | Need it in another language?]]
In today’s project, we will see how to better leverage the GetRoute function of the RoutingEngine by doing some spatial query. The GetRoute function allows you to pass two PointShapes for the start and end points of the route to build. If a PointShape is not on a line segment of the routable street data, the closet point on the closest segment will be used regardless of how far the PointShape is. Using the Spatial Query function, GetFeaturesWithinDistanceOf, we check if the PointShapes passed as start and end points are within some tolerance before proceeding with building the route. \\ For this project, you will need MapSuiteCore.dll and MapSuiteRouting.dll references.