Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
89753977
Commit
89753977
authored
Sep 17, 2019
by
Pierre TILAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Cache Map
parent
b691567d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
22 deletions
+6
-22
QGCMapEngine.cpp
src/QtLocationPlugin/QGCMapEngine.cpp
+3
-3
QGCMapUrlEngine.h
src/QtLocationPlugin/QGCMapUrlEngine.h
+0
-16
QGCTileCacheWorker.cpp
src/QtLocationPlugin/QGCTileCacheWorker.cpp
+3
-3
No files found.
src/QtLocationPlugin/QGCMapEngine.cpp
View file @
89753977
...
@@ -287,15 +287,15 @@ QGCMapEngine::cacheTile(QString type, const QString& hash, const QByteArray& ima
...
@@ -287,15 +287,15 @@ QGCMapEngine::cacheTile(QString type, const QString& hash, const QByteArray& ima
QString
QString
QGCMapEngine
::
getTileHash
(
QString
type
,
int
x
,
int
y
,
int
z
)
QGCMapEngine
::
getTileHash
(
QString
type
,
int
x
,
int
y
,
int
z
)
{
{
return
QString
().
sprintf
(
"%0
4
d%08d%08d%03d"
,
getQGCMapEngine
()
->
urlFactory
()
->
getIdFromType
(
type
),
x
,
y
,
z
);
return
QString
().
sprintf
(
"%0
9
d%08d%08d%03d"
,
getQGCMapEngine
()
->
urlFactory
()
->
getIdFromType
(
type
),
x
,
y
,
z
);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
QString
QString
QGCMapEngine
::
hashToType
(
const
QString
&
hash
)
QGCMapEngine
::
hashToType
(
const
QString
&
hash
)
{
{
QString
type
=
hash
.
mid
(
0
,
4
);
QString
type
=
hash
.
mid
(
0
,
9
);
return
static_cast
<
QString
>
(
type
.
toInt
());
return
urlFactory
()
->
getTypeFromId
(
type
.
toInt
());
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
src/QtLocationPlugin/QGCMapUrlEngine.h
View file @
89753977
...
@@ -38,22 +38,6 @@ public:
...
@@ -38,22 +38,6 @@ public:
// VWorldSatellite = 801,
// VWorldSatellite = 801,
// VWorldStreet = 802,
// VWorldStreet = 802,
//
//
// MapboxStreets = 6000,
// MapboxLight = 6001,
// MapboxDark = 6002,
// MapboxSatellite = 6003,
// MapboxHybrid = 6004,
// MapboxWheatPaste = 6005,
// MapboxStreetsBasic = 6006,
// MapboxComic = 6007,
// MapboxOutdoors = 6008,
// MapboxRunBikeHike = 6009,
// MapboxPencil = 6010,
// MapboxPirates = 6011,
// MapboxEmerald = 6012,
// MapboxHighContrast = 6013,
//
//
// AirmapElevation = 8001
// AirmapElevation = 8001
// };
// };
...
...
src/QtLocationPlugin/QGCTileCacheWorker.cpp
View file @
89753977
...
@@ -448,7 +448,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
...
@@ -448,7 +448,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
query
.
addBindValue
(
task
->
tileSet
()
->
bottomRightLon
());
query
.
addBindValue
(
task
->
tileSet
()
->
bottomRightLon
());
query
.
addBindValue
(
task
->
tileSet
()
->
minZoom
());
query
.
addBindValue
(
task
->
tileSet
()
->
minZoom
());
query
.
addBindValue
(
task
->
tileSet
()
->
maxZoom
());
query
.
addBindValue
(
task
->
tileSet
()
->
maxZoom
());
query
.
addBindValue
(
task
->
tileSet
()
->
type
(
));
query
.
addBindValue
(
getQGCMapEngine
()
->
urlFactory
()
->
getIdFromType
(
task
->
tileSet
()
->
type
()
));
query
.
addBindValue
(
task
->
tileSet
()
->
totalTileCount
());
query
.
addBindValue
(
task
->
tileSet
()
->
totalTileCount
());
query
.
addBindValue
(
QDateTime
::
currentDateTime
().
toTime_t
());
query
.
addBindValue
(
QDateTime
::
currentDateTime
().
toTime_t
());
if
(
!
query
.
exec
())
{
if
(
!
query
.
exec
())
{
...
@@ -476,7 +476,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
...
@@ -476,7 +476,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
query
.
prepare
(
"INSERT OR IGNORE INTO TilesDownload(setID, hash, type, x, y, z, state) VALUES(?, ?, ?, ?, ? ,? ,?)"
);
query
.
prepare
(
"INSERT OR IGNORE INTO TilesDownload(setID, hash, type, x, y, z, state) VALUES(?, ?, ?, ?, ? ,? ,?)"
);
query
.
addBindValue
(
setID
);
query
.
addBindValue
(
setID
);
query
.
addBindValue
(
hash
);
query
.
addBindValue
(
hash
);
query
.
addBindValue
(
type
);
query
.
addBindValue
(
getQGCMapEngine
()
->
urlFactory
()
->
getIdFromType
(
type
)
);
query
.
addBindValue
(
x
);
query
.
addBindValue
(
x
);
query
.
addBindValue
(
y
);
query
.
addBindValue
(
y
);
query
.
addBindValue
(
z
);
query
.
addBindValue
(
z
);
...
@@ -897,7 +897,7 @@ QGCCacheWorker::_exportSets(QGCMapTask* mtask)
...
@@ -897,7 +897,7 @@ QGCCacheWorker::_exportSets(QGCMapTask* mtask)
exportQuery
.
addBindValue
(
set
->
bottomRightLon
());
exportQuery
.
addBindValue
(
set
->
bottomRightLon
());
exportQuery
.
addBindValue
(
set
->
minZoom
());
exportQuery
.
addBindValue
(
set
->
minZoom
());
exportQuery
.
addBindValue
(
set
->
maxZoom
());
exportQuery
.
addBindValue
(
set
->
maxZoom
());
exportQuery
.
addBindValue
(
set
->
type
(
));
exportQuery
.
addBindValue
(
getQGCMapEngine
()
->
urlFactory
()
->
getIdFromType
(
set
->
type
()
));
exportQuery
.
addBindValue
(
set
->
totalTileCount
());
exportQuery
.
addBindValue
(
set
->
totalTileCount
());
exportQuery
.
addBindValue
(
set
->
defaultSet
());
exportQuery
.
addBindValue
(
set
->
defaultSet
());
exportQuery
.
addBindValue
(
QDateTime
::
currentDateTime
().
toTime_t
());
exportQuery
.
addBindValue
(
QDateTime
::
currentDateTime
().
toTime_t
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment