Skip Menu |

This queue is for tickets about the Geo-OSM-Tiles CPAN distribution.

Report information
The Basics
Id: 94148
Status: open
Priority: 0/
Queue: Geo-OSM-Tiles

People
Owner: Nobody in particular
Requestors: gregoa [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] New OSM URLs
Date: Mon, 24 Mar 2014 18:22:50 +0100
To: bug-geo-osm-tiles [...] rt.cpan.org
From: gregor herrmann <gregoa [...] debian.org>
In Debian we are currently applying the attached patch to Geo-OSM-Tiles. We thought you might be interested in it, too. Description: OSM has changed their short copyable URLs Origin: vendor Author: gregor herrmann <gregoa@debian.org> Last-Update: 2014-03-24 Thanks in advance, gregor herrmann, Debian Perl Group

Message body is not shown because sender requested not to inline it.

Updated patch attached; the first version ignore negative coordinates :/ Cheers, gregor
Subject: new-osm-urls.patch
Description: OSM has changed their short copyable URLs Origin: vendor Bug: https://rt.cpan.org/Ticket/Display.html?id=94148 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=94148 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2014-08-14 --- a/downloadosmtiles.pl +++ b/downloadosmtiles.pl @@ -98,6 +98,10 @@ sub selecttilescmdline { if ($opt{link}) { + # rewrite new style OSM links to old pattern + if ($opt{link} =~ /^http:\/\/(.+)\/#map=(\d+)\/(-?[\d.]+)\/(-?[\d.]+)/) { + $opt{link} = "http://$1/?lat=$3&lon=$4&zoom=$2&layers=M"; + } die "Invalid link: $opt{link}\n" unless $opt{link} =~ /^http:\/\/.*\/\?lat=(-?\d+(?:\.\d+)?)\&lon=(-?\d+(?:\.\d+)?)\&zoom=(\d+)/; my $lat = $1;