• CommentAuthorgbanister
    • CommentTimeJul 26th 2012 edited
     
    Are there any samples using the javascript api similar to the "Developing a simple web based mapping application" (http://dev.telogis.com/resources/view/developing-a-simple-web-based-mapping-application) that includes a route between two points being rendered on the map?

    Thanks,
    Greg
    • CommentAuthorgbanister
    • CommentTimeJul 26th 2012
     
    I think I figured out how to do this so I thought I'd post it back:

    route_layer = new RouteLayer({ map: map, id: 'map_route' });

    var route = new Route();
    route.setStart(new LatLon(start.Lat, start.Lon));
    route.setEnd(new LatLon(end.Lat, end.Lon));

    route.getDirections(function (directions) {
    route_layer.setPoints(directions.getPoints());
    });
  1.  
    Hi Greg,

    That's correct. If you look in the scripts folder of your GeoStream server, you should find a large number of sample scripts installed along with the SDK, all of which have the prefix "tutorial". These demonstrate a variety of features, including the use of Routes & RouteLayers.

    Let us know if you have any further questions.

    Thanks,

    Alex