.NET Development: Rendering a route with a great number of waypoints
1 to 4 of 4
-
- CommentAuthorFannH
- CommentTimeNov 30th 2011
Hello,
I have a series of waypoints (more than 1000) which constistute a route. I would like to render this route by rendering each interval (route between two successives waypoints) separately.
I could do it by drawing lines, because I don't need directions, or calculation of the best route. But I would like my lines to follow the shape of cartographic information (for a better rendering in curves for example).
That is why I tryed to create "Route" objects with the API, to render the Directions objects, but in my case there are two many Directions objects to create, and the map rendering is significantly slower. I tryed the method "GetQuickDirections()" too, but I got a RoutingOutOfMemoryException after 35 calls.
Is there any way to render my route ?
Regards,
Fanny -
- CommentAuthorAlex H
- CommentTimeNov 30th 2011
Hi Fanny,
Interesting query! A few questions:
1) Why do you need to render each interval separately? Do you want them to be in different colours, or do you want to draw them successively in realtime?
2) Do you have any timing data for your stops? This would enable the use of our Route.GetRouteHighlight function, which may be useful in your solution.
3) Are you working on desktop .NET, or .NET CF on a Windows Mobile/CE Device?
I'm slightly concerned by the RoutingOutOfMemoryException - this should only potentially occur for single route calculations for a very long route, not successive small route calculations. Would you be able to send sample code and data to gbsupport@telogis.com?
Thanks,
Alex -
- CommentAuthorFannH
- CommentTimeDec 1st 2011
Hello Alex,
Thanks for your answer,
1- Yes I need to change the color of some intervals in realtime.
2- No I do not have timing data.
3- I am working on desktop .NET.
I found a solution which suits me : I still create Directions objects for each interval, but instead of adding them to the map renderer, I extract the points (Points property) and use them to draw lines with the Drawing library. The number of points seems optimized to fit the shape of the streets and the map rendering performance is not slower.
Regards,
Fanny -
- CommentAuthorAlex H
- CommentTimeDec 5th 2011
Hi Fanny,
Glad you've found a solution that works for you - thanks for sharing it! If you hit any more problems, don't hesitate to mail our support team at the address above.
Thanks,
Alex
1 to 4 of 4
