The application I am working on lets the user draw a "route" using the TrackLine mode. The problem is that I cannot find a way to pan the map while the user is drawing a line. This is necessary because the entire route will not always be contained within the map extent/current viewport. As soon as I change the mode to Pan the trackline disappears. I have also tried to manually pan the map when the user moves the mouse outside the viewport using MouseLeave event, but it will not work when the user is currently drawing a line.
One idea would be to set the TrackLine.Mode = TrackMode.None on the MouseLeave Event or to have a button to set TrackLine.Mode = TrackMode.None. Once the TrackMode is set to .None the user could then pan the Map with a click and drag and then have them click on a button to continue drawing their track line. This button would call winformsMap1.TrackOverlay.TrackMode = TrackMode.Line; which would continue their line.
I cannot find the TrackMode.None. I have to mention I am using MapSuite Desktop version 2. I tried to set the map mode to ModeType.Selection and ModeType.Pan, but as soon as I change the MapMode the trackline disappears. Any other way to accomplish this?
A little more background information:
I am trying to create a route planning tool, with support for editable waypoints. I.e. it should be possible for the user to draw a "route" on the map, where each leg is connected by a waypoint. Key features that must be supported:
- At any time it should be possible to click and drag on a waypoint to adjust the route dynamically
- It must be possible to add new waypoints at the start, in the middle, and at the end of route/line afterwards
- It must be possible to click on a leg (line between two waypoints) and choose whether it should be drawn as rhumb line or great circle
Based on the above information, is this at all possible with MapSuite and how much custom coding approx will be needed?
Ok, thanks. What about the other questions? Would it be possible to build a "route planner" tool like explained, with editable waypoints using MapSuite Desktop (latest version)?
Great, thanks :) Is this also possible with MapSuite Desktop 5? We already have a license for v5, and in order to use v6 we would need to purchase a new license I believe.