Unverified Commit 2ccbd9b2 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Breaking news: negative coordinates do exist

parent 31b5c565
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ sub new {

	# station search results include lat/lon keys in JSON; route entries do not
	my ( $lon, $lat );
	if ( $json->{id} =~ m{ [@]X= (?<lon> \d+) [@]Y= (?<lat> \d+) }x ) {
	if ( $json->{id} =~ m{ [@]X= (?<lon> -? \d+) [@]Y= (?<lat> -? \d+) }x ) {
		$lat = $+{lat} / 1e6;
		$lon = $+{lon} / 1e6;
	}