Changeset View
Changeset View
Standalone View
Standalone View
src/lib/marble/layers/VectorTileLayer.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 112 | { | |||
---|---|---|---|---|---|
116 | connect(&d->m_loader, SIGNAL(tileCompleted(TileId, GeoDataDocument*)), this, SLOT(updateTile(TileId, GeoDataDocument*))); | 116 | connect(&d->m_loader, SIGNAL(tileCompleted(TileId, GeoDataDocument*)), this, SLOT(updateTile(TileId, GeoDataDocument*))); | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | VectorTileLayer::~VectorTileLayer() | 119 | VectorTileLayer::~VectorTileLayer() | ||
120 | { | 120 | { | ||
121 | delete d; | 121 | delete d; | ||
122 | } | 122 | } | ||
123 | 123 | | |||
124 | QStringList VectorTileLayer::renderPosition() const | 124 | RenderPositions VectorTileLayer::renderPositions() const | ||
125 | { | 125 | { | ||
126 | return QStringList() << "SURFACE"; | 126 | return SurfaceRenderPosition; | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | RenderState VectorTileLayer::renderState() const | 129 | RenderState VectorTileLayer::renderState() const | ||
130 | { | 130 | { | ||
131 | return RenderState( "Vector Tiles" ); | 131 | return RenderState( "Vector Tiles" ); | ||
132 | } | 132 | } | ||
133 | 133 | | |||
134 | int VectorTileLayer::tileZoomLevel() const | 134 | int VectorTileLayer::tileZoomLevel() const | ||
Show All 10 Lines | 144 | { | |||
145 | int tiles = 0; | 145 | int tiles = 0; | ||
146 | foreach(const auto *mapper, d->m_activeTexmappers ) { | 146 | foreach(const auto *mapper, d->m_activeTexmappers ) { | ||
147 | tiles += mapper->cachedDocuments(); | 147 | tiles += mapper->cachedDocuments(); | ||
148 | } | 148 | } | ||
149 | int const layers = d->m_activeTexmappers.size(); | 149 | int const layers = d->m_activeTexmappers.size(); | ||
150 | return QString("Vector Tiles: %1 tiles in %2 layers").arg(tiles).arg(layers); | 150 | return QString("Vector Tiles: %1 tiles in %2 layers").arg(tiles).arg(layers); | ||
151 | } | 151 | } | ||
152 | 152 | | |||
153 | bool VectorTileLayer::render( GeoPainter *painter, ViewportParams *viewport, | 153 | bool VectorTileLayer::render(GeoPainter *painter, ViewportParams *viewport, | ||
154 | const QString &renderPos, GeoSceneLayer *layer ) | 154 | RenderPosition renderPos, GeoSceneLayer *layer) | ||
155 | { | 155 | { | ||
156 | Q_UNUSED( painter ); | 156 | Q_UNUSED( painter ); | ||
157 | Q_UNUSED( renderPos ); | 157 | Q_UNUSED( renderPos ); | ||
158 | Q_UNUSED( layer ); | 158 | Q_UNUSED( layer ); | ||
159 | 159 | | |||
160 | int const oldLevel = tileZoomLevel(); | 160 | int const oldLevel = tileZoomLevel(); | ||
161 | int level = 0; | 161 | int level = 0; | ||
162 | foreach ( VectorTileModel *mapper, d->m_activeTexmappers ) { | 162 | foreach ( VectorTileModel *mapper, d->m_activeTexmappers ) { | ||
Show All 40 Lines |