mirror of
https://github.com/derf/travelynx
synced 2024-12-04 18:29:11 +00:00
map: improve polyline duplicate detection
This commit is contained in:
parent
993f6be6c9
commit
dadb0f6637
1 changed files with 2 additions and 3 deletions
|
@ -488,8 +488,7 @@ sub map_history {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $key
|
my $key = $from_eva . '!' . $to_eva . '!' . ( $to_index - $from_index );
|
||||||
= $from_eva . '!' . $to_eva . '!' . $from_index . '!' . $to_index;
|
|
||||||
|
|
||||||
if ( $seen{$key} ) {
|
if ( $seen{$key} ) {
|
||||||
next;
|
next;
|
||||||
|
@ -498,7 +497,7 @@ sub map_history {
|
||||||
$seen{$key} = 1;
|
$seen{$key} = 1;
|
||||||
|
|
||||||
# direction does not matter at the moment
|
# direction does not matter at the moment
|
||||||
$key = $to_eva . '!' . $from_eva . '!' . $to_index . '!' . $from_index;
|
$key = $to_eva . '!' . $from_eva . '!' . ( $to_index - $from_index );
|
||||||
$seen{$key} = 1;
|
$seen{$key} = 1;
|
||||||
|
|
||||||
@polyline = @polyline[ $from_index .. $to_index ];
|
@polyline = @polyline[ $from_index .. $to_index ];
|
||||||
|
|
Loading…
Reference in a new issue