How to get the mapSolution ?

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

sofax222
Developers
Developers
Posts: 214
Joined: 24 Nov 2010, 03:08
Noob?: Yes

How to get the mapSolution ?

#1 Post by sofax222 »

In plugin .pl, how to get the mapSolutions that extract from route task ?

Actually, I want to what is the next map in my current routing !
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: How to get the mapSolution ?

#2 Post by EternalHarvest »

Code: Select all

$task->{mapSolution}

Code: Select all

$task->{mapSolution} && $task->{mapSolution}[1] && $task->{mapSolution}[1]{map}
sofax222
Developers
Developers
Posts: 214
Joined: 24 Nov 2010, 03:08
Noob?: Yes

Re: How to get the mapSolution ?

#3 Post by sofax222 »

EternalHarvest wrote:

Code: Select all

$task->{mapSolution}

Code: Select all

$task->{mapSolution} && $task->{mapSolution}[1] && $task->{mapSolution}[1]{map}
Sorry, how to get the current 'route' task ($task) ?
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: How to get the mapSolution ?

#4 Post by EternalHarvest »

Code: Select all

if (defined(my $routeIndex = AI::findAction('route')) and my $task = AI::args($routeIndex)) {
   ...