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
7331365d
Commit
7331365d
authored
Mar 19, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code
parent
2687a5fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
FlightMap.qml
src/FlightMap/FlightMap.qml
+0
-26
No files found.
src/FlightMap/FlightMap.qml
View file @
7331365d
...
...
@@ -56,32 +56,6 @@ Map {
return
dist
}
function
calculateScale
()
{
var
coord1
,
coord2
,
dist
,
text
,
f
f
=
0
coord1
=
_map
.
toCoordinate
(
Qt
.
point
(
0
,
scale
.
y
))
coord2
=
_map
.
toCoordinate
(
Qt
.
point
(
0
+
scaleImage
.
sourceSize
.
width
,
scale
.
y
))
dist
=
Math
.
round
(
coord1
.
distanceTo
(
coord2
))
if
(
dist
===
0
)
{
// not visible
}
else
{
for
(
var
i
=
0
;
i
<
scaleLengths
.
length
-
1
;
i
++
)
{
if
(
dist
<
(
scaleLengths
[
i
]
+
scaleLengths
[
i
+
1
])
/
2
)
{
f
=
scaleLengths
[
i
]
/
dist
dist
=
scaleLengths
[
i
]
break
;
}
}
if
(
f
===
0
)
{
f
=
dist
/
scaleLengths
[
i
]
dist
=
scaleLengths
[
i
]
}
}
text
=
formatDistance
(
dist
)
scaleImage
.
width
=
(
scaleImage
.
sourceSize
.
width
*
f
)
-
2
*
scaleImageLeft
.
sourceSize
.
width
scaleText
.
text
=
text
}
function
setVisibleRegion
(
region
)
{
// This works around a bug on Qt where if you set a visibleRegion and then the user moves or zooms the map
// and then you set the same visibleRegion the map will not move/scale appropriately since it thinks there
...
...
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