Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libraries
KOSMIndoorMap
Commits
82aeccb5
Commit
82aeccb5
authored
Oct 19, 2020
by
Volker Krause
Browse files
Support one more building level range tagging scheme
parent
6ef1a672
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/map/loader/mapdata.cpp
View file @
82aeccb5
...
...
@@ -118,6 +118,8 @@ void MapData::processElements()
const
auto
buildingLevelsTag
=
m_dataSet
.
tagKey
(
"building:levels"
);
const
auto
buildingMinLevelTag
=
m_dataSet
.
tagKey
(
"building:min_level"
);
const
auto
buildingLevelsUndergroundTag
=
m_dataSet
.
tagKey
(
"building:levels:underground"
);
const
auto
maxLevelTag
=
m_dataSet
.
tagKey
(
"max_level"
);
const
auto
minLevelTag
=
m_dataSet
.
tagKey
(
"min_level"
);
MapCSSParser
p
;
auto
filter
=
p
.
parse
(
QStringLiteral
(
":/org.kde.kosmindoormap/assets/css/input-filter.mapcss"
));
...
...
@@ -158,9 +160,10 @@ void MapData::processElements()
// multi-level building element
// we handle this first, before level=, as level is often used instead
// of building:min_level in combination with building:level
const
auto
buildingLevels
=
e
.
tagValue
(
buildingLevelsTag
).
to
U
Int
();
const
auto
buildingLevels
=
e
.
tagValue
(
buildingLevelsTag
,
maxLevelTag
).
toInt
();
if
(
buildingLevels
>
0
)
{
const
auto
startLevel
=
e
.
tagValue
(
buildingMinLevelTag
,
levelTag
).
toUInt
();
const
auto
startLevel
=
e
.
tagValue
(
buildingMinLevelTag
,
levelTag
,
minLevelTag
).
toInt
();
qDebug
()
<<
startLevel
<<
buildingLevels
<<
e
.
url
();
for
(
auto
i
=
startLevel
;
i
<
buildingLevels
;
++
i
)
{
addElement
(
i
*
10
,
e
,
true
);
}
...
...
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