1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-06 23:52:51 +02:00

Compare commits

..

11 Commits
5.7 ... 5.9

Author SHA1 Message Date
cb09ea0681 Version++ 2018-04-19 19:50:04 +02:00
e5d566807a Fixed HTTP redirects (+addded support for relative URLs)
Fixes #104
2018-04-19 19:46:56 +02:00
0ce2cfd13c Update gpxsee_sv.ts (#102)
* Update gpxsee_sv.ts

* Fixed typo

Sorry! I edited online, on a borrowed windows machine.  :(
2018-04-18 22:03:26 +02:00
e1532b978f The true cause of the map switch offset... 2018-04-18 22:02:24 +02:00
bb10f7c0e1 Version++ 2018-04-17 22:54:42 +02:00
8ff21b5b37 Added the Polish translation into the builds 2018-04-17 22:52:47 +02:00
32f41e5287 Added new PL (Polish) translation file. (#103) 2018-04-17 22:40:12 +02:00
c50e41dea1 Numerical instability fix 2018-04-17 22:26:20 +02:00
e34800b8d1 Updated description (added OziExplorer files) 2018-04-17 21:27:03 +02:00
6642a2f810 Updated USGS maps URLs 2018-04-17 21:25:47 +02:00
55458b04a6 Fixed 1px map change offset & invalid zoom level 2018-04-17 21:24:46 +02:00
12 changed files with 1668 additions and 27 deletions

View File

@ -1,4 +1,4 @@
version: 5.7.{build}
version: 5.9.{build}
configuration: Release
platform: Any CPU
environment:

View File

@ -1,6 +1,6 @@
# GPXSee
GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
KML, FIT, IGC and NMEA files.
KML, FIT, IGC, NMEA and OziExplorer files.
## Features
* User-definable online maps (OSM/Google tiles, WMTS, WMS).
@ -11,7 +11,7 @@ KML, FIT, IGC and NMEA files.
* Print/export to PDF.
* Full-screen mode.
* Native GUI for Windows, Mac OS X and Linux.
* Opens GPX, TCX, FIT, KML, IGC, NMEA and Garmin CSV files.
* Opens GPX, TCX, FIT, KML, IGC, NMEA, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
![GPXSee - Linux](https://a.fsdn.com/con/app/proj/gpxsee/screenshots/linux2.png)

View File

@ -1,5 +1,5 @@
TARGET = GPXSee
VERSION = 5.7
VERSION = 5.9
QT += core \
gui \
network
@ -226,7 +226,8 @@ TRANSLATIONS = lang/gpxsee_cs.ts \
lang/gpxsee_de.ts \
lang/gpxsee_ru.ts \
lang/gpxsee_fi.ts \
lang/gpxsee_fr.ts
lang/gpxsee_fr.ts \
lang/gpxsee_pl.ts
macx {
ICON = icons/gpxsee.icns
QMAKE_INFO_PLIST = pkg/Info.plist
@ -236,7 +237,8 @@ macx {
lang/gpxsee_fi.qm \
lang/gpxsee_fr.qm \
lang/gpxsee_ru.qm \
lang/gpxsee_sv.qm
lang/gpxsee_sv.qm \
lang/gpxsee_pl.qm
CSV.path = Contents/Resources
CSV.files = pkg/csv
MAPS.path = Contents/Resources

1614
lang/gpxsee_pl.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@
<message>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation type="unfinished"></translation>
<translation>OziExplorer-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
@ -1155,7 +1155,7 @@
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="315"/>
<source>Filtering</source>
<translation>Filtrerar</translation>
<translation>Filtrering</translation>
</message>
<message>
<location filename="../src/GUI/optionsdialog.cpp" line="316"/>

View File

@ -5,7 +5,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "5.7"
!define VERSION "5.9"
; The file to write
OutFile "GPXSee-${VERSION}.exe"
@ -230,6 +230,11 @@ SectionGroup "Localization" SEC_LOCALIZATION
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
File /oname=translations\qt_de.qm translations\qt_de.qm
SectionEnd
Section "Polish"
CreateDirectory "$INSTDIR\translations"
File /oname=translations\gpxsee_pl.qm translations\gpxsee_pl.qm
File /oname=translations\qt_pl.qm translations\qt_pl.qm
SectionEnd
Section "Russian"
CreateDirectory "$INSTDIR\translations"
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm

View File

@ -5,7 +5,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "5.7"
!define VERSION "5.9"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
@ -232,6 +232,11 @@ SectionGroup "Localization" SEC_LOCALIZATION
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
File /oname=translations\qt_de.qm translations\qt_de.qm
SectionEnd
Section "Polish"
CreateDirectory "$INSTDIR\translations"
File /oname=translations\gpxsee_pl.qm translations\gpxsee_pl.qm
File /oname=translations\qt_pl.qm translations\qt_pl.qm
SectionEnd
Section "Russian"
CreateDirectory "$INSTDIR\translations"
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
@ -312,4 +317,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
!insertmacro MUI_FUNCTION_DESCRIPTION_END

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1">
<name>USGS Imagery</name>
<url>https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y</url>
<url>https://basemap.nationalmap.gov/ArcGIS/rest/services/USGSImageryOnly/MapServer/tile/$z/$y/$x</url>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
<zoom min="2" max="15"/>
<bounds bottom="0" top="74"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1">
<name>USGS Topo</name>
<url>https://navigator.er.usgs.gov/tiles/tcr.cgi/$z/$x/$y.png</url>
<url>https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/$z/$y/$x</url>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
<zoom min="2" max="15"/>
</map>

View File

@ -287,7 +287,9 @@ void MapView::setMap(Map *map)
it.value()->setMap(_map);
updatePOIVisibility();
centerOn(_map->ll2xy(cr.center()));
QPointF nc = QRectF(_map->ll2xy(cr.topLeft()),
_map->ll2xy(cr.bottomRight())).center();
centerOn(nc);
resetCachedContent();
QPixmapCache::clear();

View File

@ -91,9 +91,14 @@ bool Downloader::doDownload(const Download &dl,
{
QUrl url(dl.url());
if (!url.isValid() || !(url.scheme() == "http" || url.scheme() == "https")) {
qWarning("%s: Invalid URL\n", qPrintable(url.toString()));
return false;
}
if (_errorDownloads.contains(url))
return false;
if (_currentDownloads.contains(url))
if (_currentDownloads.contains(url) && !redirect)
return false;
QNetworkRequest request(url);
@ -107,10 +112,12 @@ bool Downloader::doDownload(const Download &dl,
request.setRawHeader("Authorization", authorization);
QNetworkReply *reply = _manager.get(request);
if (reply) {
if (reply && reply->isRunning()) {
_currentDownloads.insert(url);
ReplyTimeout::setTimeout(reply, TIMEOUT);
} else
} else if (reply)
downloadFinished(reply);
else
return false;
return true;
@ -157,20 +164,25 @@ void Downloader::downloadFinished(QNetworkReply *reply)
QUrl origin = reply->request().attribute(ATTR_ORIGIN).toUrl();
int level = reply->request().attribute(ATTR_LEVEL).toInt();
if (location == url) {
_errorDownloads.insert(url);
qWarning("Error downloading file: %s: "
"redirect loop\n", url.toEncoded().constData());
} else if (level >= MAX_REDIRECT_LEVEL) {
if (level >= MAX_REDIRECT_LEVEL) {
_errorDownloads.insert(origin);
qWarning("Error downloading file: %s: "
"redirect level limit reached\n",
"redirect level limit reached (redirect loop?)\n",
origin.toEncoded().constData());
} else {
QUrl redirectUrl;
if (location.isRelative()) {
QString path = QDir::isAbsolutePath(location.path())
? location.path() : "/" + location.path();
redirectUrl = QUrl(url.scheme() + "://" + url.host() + path);
} else
redirectUrl = location;
Redirect redirect(origin.isEmpty() ? url : origin, level + 1);
Download dl(location, filename);
doDownload(dl, reply->request().rawHeader("Authorization"),
&redirect);
Download dl(redirectUrl, filename);
if (!doDownload(dl, reply->request().rawHeader("Authorization"),
&redirect))
_errorDownloads.insert(origin.isEmpty() ? url : origin);
}
} else
if (!saveToDisk(filename, reply))

View File

@ -8,6 +8,7 @@
#define TILE_SIZE 256
#define EPSILON 1e-6
static QPointF ll2m(const Coordinates &c)
{
@ -36,7 +37,7 @@ static qreal zoom2scale(int zoom)
static int scale2zoom(qreal scale)
{
return (int)log2(360.0/(scale * (qreal)TILE_SIZE));
return (int)(log2(360.0/(scale * (qreal)TILE_SIZE)) + EPSILON);
}