mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 11:39:16 +02:00
Initial WMS support (no multi-layer support for now)
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#include <QNetworkProxyFactory>
|
||||
#include <QLibraryInfo>
|
||||
#include "map/wmts.h"
|
||||
#include "map/wms.h"
|
||||
#include "map/tileloader.h"
|
||||
#include "map/downloader.h"
|
||||
#include "map/ellipsoid.h"
|
||||
@ -40,6 +41,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
Downloader *dl = new Downloader(this);
|
||||
TileLoader::setDownloader(dl);
|
||||
WMTS::setDownloader(dl);
|
||||
WMS::setDownloader(dl);
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
@ -179,7 +179,7 @@ QList<PathItem *> MapView::loadData(const Data &data)
|
||||
if (_tracks.empty() && _routes.empty() && _waypoints.empty())
|
||||
return paths;
|
||||
|
||||
if (mapZoom() != zoom)
|
||||
if (fitMapZoom() != zoom)
|
||||
rescale();
|
||||
else
|
||||
updatePOIVisibility();
|
||||
@ -189,7 +189,7 @@ QList<PathItem *> MapView::loadData(const Data &data)
|
||||
return paths;
|
||||
}
|
||||
|
||||
int MapView::mapZoom() const
|
||||
int MapView::fitMapZoom() const
|
||||
{
|
||||
RectC br = _tr | _rr | _wr;
|
||||
|
||||
@ -389,7 +389,10 @@ void MapView::setCoordinatesFormat(CoordinatesFormat format)
|
||||
void MapView::clearMapCache()
|
||||
{
|
||||
_map->clearCache();
|
||||
resetCachedContent();
|
||||
|
||||
fitMapZoom();
|
||||
rescale();
|
||||
centerOn(contentCenter());
|
||||
}
|
||||
|
||||
void MapView::digitalZoom(int zoom)
|
||||
@ -767,7 +770,7 @@ void MapView::resizeEvent(QResizeEvent *event)
|
||||
QGraphicsView::resizeEvent(event);
|
||||
|
||||
int zoom = _map->zoom();
|
||||
if (mapZoom() != zoom)
|
||||
if (fitMapZoom() != zoom)
|
||||
rescale();
|
||||
|
||||
centerOn(contentCenter());
|
||||
|
@ -80,7 +80,7 @@ private:
|
||||
void loadPOI();
|
||||
void clearPOI();
|
||||
|
||||
int mapZoom() const;
|
||||
int fitMapZoom() const;
|
||||
QPointF contentCenter() const;
|
||||
void rescale();
|
||||
void centerOn(const QPointF &pos);
|
||||
|
Reference in New Issue
Block a user