PDA

View Full Version : Avoid Area - MapPoint 2010



cwhitehe
11-08-2010, 09:22 AM
In MapPoint 2010 when you do Avoid Area the route seems to automatically re-calculate. In older versions of MapPoint (2009 and earlier) you have to manually click a button to re-calculate.

In the ActiveX control the same behaviour seems to happen. This means our integration works differently in MapPoint 2010 and we have to code around this to fix it.

Is there a way to prevent the automatic re-calculation of a route under these circumstances?

In addition to this, we hide the itinerary and when this automatic re-calculation occurs the itinerary comes back to the screen. We have to immediately hide it but this does not look very professional popping up for a second or two.

Eric Frost
11-08-2010, 09:49 AM
This is a stretch, but maybe if you can catch the SelectionChange event and override it to do Nothing, that would help?

I'm assuming MP10's change in behaviour is using the SelectionChange event to see if an Avoidance Polygon was just added (or edited) and if you could override the behavior to do nothing, that might take care of it?

Eric

cwhitehe
11-08-2010, 10:00 AM
Thanks for the reply. What are you suggesting I should try and set to Nothing? I still want the avoid area shape to exist, I just don't want it to automatically re-calculate.

Mattys Consulting
11-08-2010, 04:37 PM
Eric said make it do nothing. In other words, cancel the event.

Eric Frost
11-08-2010, 04:48 PM
Oh sorry yeah what he said. I have no idea if it will work however, it's just a theory that it's recalculating based on the SelectionChange Event.

See the BeforeClick event. As you can imagine, clicking on the map performs various actions based on what was clicked on. And you can override the MapPoint's default behavior by canceling the event.

Try doing the same with SelectionChange (or another event?) and see if you can prevent MapPoint from recalculating the route that way.

Make sense?

Hope this helps and good luck!

Eric

Eric Frost
11-08-2010, 06:21 PM
(And please let us know if that works :-) )

cwhitehe
11-09-2010, 03:30 AM
The SelectionChange event does not have the ability to cancel. I tried a few things in various events and could not get it to work. I'm still experimenting but no luck so far.