This example app demonstrates the following features:
- Calculate a route by drawing with the finger or mouse on the map.
When you run the example app, you'll be viewing the scene from above. The map is fully interactive, and supports pan and zoom.
Double-click once to activate draw mode, then click and drag a route from one point to another on the map, and when the finger is lifted/mouse button is released, the route is generated using the waypoints along the traced route.
Double-click twice to activate draw mode, then click and drag a route from one point to another on the map, and when the finger is lifted/mouse button is released, the route is generated using only the initial and final waypoint from the traced route, thus the route will be the most efficient between the starting/departure position and destination, with no intermediate waypoints.
- Create a
MapServiceListener,OpenGLContext,ScreenandMapView. - Create a
RouteList, aLandmarkListwith two Landmarks in it and aRoutePreferencesobject. - Call the
RoutingServiceusingRouteList,LandmarkList,RoutePreferencesand the progress listener. - Once the route calculation operation completes, add the first calculated route to the
MapViewPreferencesroutes collection. - Instruct the
MapViewto center on the first route.
