User Tools

Site Tools


map_suite_routing_general_samples

Map Suite Routing General Samples

Displaying One-Way Streets

LEAD Technologies Inc. V1.01

In the Discussion Forum Post “Drawing one-way streets in the map”, we have a question on how to display an arrow on a street that is one way as Google Map does. In this project, we show the solution by creating a LineStyle specifically for that purpose. We take the shapefile “AustinWithOneWayRoad.shp” from the sample app “Route On One-Way Roads” of Map Suite Routing Extension to display the arrow according to the traffic direction on the one-way streets


One Way Street Builder

map_suite_routing_sample_one_way_street_builder.jpg

In the sample apps “How Do I” of the Routing product, we have a sample that shows how the route is constructed on a one way street. Today’s project is meant to complement by showing how to set selected streets to be one way and in the desired direction. From this sample, you can create your own utility to handle your data for routing purposes.


POI on Route

In today’s project, we are looking at the Routing extension of Map Suite. As a reinforcement of what we learned in the samples of “How Do I”, we show how to find the shortest route between the start and the end point. In addition to that, we show how to use the MultiLineShape from the result of the GetRoute function to do a spatial query to get the points of interests (POI) on the route.

For this sample, you would need a reference of either the full or evaluation of MapSuiteCore.dll and MapSuiteRouting.dll.


POI on route(Advanced)

map_suite_routing_sample_poi_on_route_advanced.jpg

In the project “POI on route”, we learned how to get the points of interests (POI) on the route within a certain buffer distance. In today’s project, we are going to go a step further and we show the technique for finding the POIs according to what side of the route they are located. For example, in the delivery industry, it is far more efficient to deliver to stops on the right side of the road when driving on the right side of the road.


Routing Styles

map_suite_routing_sample_routing_styles.jpg

The API for the Routing extension product provides a class RoutingLayer. RoutingLayer is basically a convenient layer to have the features for routing being displayed in a default way. You can add the start, end point, the routes and it is going to display that nicely for you without much work on your side. While this is convenient, you may be in the situation when you want more control on the styles and have the whole flexibility that an InMemoryFeatureLayer gives you. In this project, we show how to display in InMemoryFeaturesLayers the start and end points, as well as the resulting route using the full power of InMemoryFeatureLayer such as zoom levels and custom styles.


Routing Tolerance

map_suite_routing_sample_routing_tolerance.jpg

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.


Routing with Projections

map_suite_routing_sample_routing_with_projection.jpg

From a Discussion Forum request, in today’s project we show how to perform routing in one projection and display the result in another. You may be in the situation where you have your routable street data in State Plane meters and you have your base map in Geodetic (decimal degrees). This project shows you how to handle this case.


Smooth Transparent Route

map_suite_routing_sample_smooth_transparent_route.jpg

In the Routing extension, the API GetRoute of the RoutingEngine returns a MultilineShape made of a collection of LineShape. By default, the MultilineShape has LineShapes for each two vertex line segment. The result in the displaying of the route using some transparency is a route that looks dotted and irregular. In this project, we show the trick to get one continuous LineShape which will show as smooth and regular. We recognized that the default result is not the most adequate in most cases and we will correct that for the next major release of the Routing extension. In the meantime, you can use that project to get the result that you want to display your routes.


Traveling Salesman Problem

map_suite_routing_sample_traveling_salesman_problem.jpg

In today’s project, we are seeing a variant of the sample “Traveling Salesman Problem” of the “How Do I” samples of the Routing product. At the request of a Discussion Forum user, we added a new API to the GetRouteViaVisitStops function where now you can have distinct start and end points. For being able to run this app, you will need the version 3.1.427.0 or later.


map_suite_routing_general_samples.txt · Last modified: 2015/10/10 07:31 (external edit)