Skip to content
GitLab
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
9710922c
Commit
9710922c
authored
Oct 30, 2020
by
Volker Krause
Browse files
Show free floating rental bikes correctly in the overlay
parent
6bf411a0
Pipeline
#40073
canceled with stage
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/map-publictransport-integration/locationqueryoverlayproxymodel.cpp
View file @
9710922c
...
...
@@ -37,6 +37,7 @@ void LocationQueryOverlayProxyModel::setMapData(const MapData &data)
m_data
=
data
;
if
(
!
m_data
.
isEmpty
())
{
m_tagKeys
.
name
=
m_data
.
dataSet
().
makeTagKey
(
"name"
);
m_tagKeys
.
amenity
=
m_data
.
dataSet
().
makeTagKey
(
"amenity"
);
m_tagKeys
.
capacity
=
m_data
.
dataSet
().
makeTagKey
(
"capacity"
);
m_tagKeys
.
realtimeAvailable
=
m_data
.
dataSet
().
makeTagKey
(
"mx:realtime_available"
);
...
...
@@ -171,8 +172,15 @@ LocationQueryOverlayProxyModel::Info LocationQueryOverlayProxyModel::nodeForRow(
if
(
loc
.
rentalVehicleStation
().
capacity
()
>=
0
)
{
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
capacity
,
QByteArray
::
number
(
loc
.
rentalVehicleStation
().
capacity
()));
}
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
realtimeAvailable
,
QByteArray
::
number
(
loc
.
rentalVehicleStation
().
availableVehicles
()));
if
(
OSM
::
tagValue
(
info
.
overlayNode
,
m_tagKeys
.
network
).
isEmpty
())
{
if
(
loc
.
rentalVehicleStation
().
isValid
())
{
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
realtimeAvailable
,
QByteArray
::
number
(
loc
.
rentalVehicleStation
().
availableVehicles
()));
}
else
{
// free floating
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
name
,
loc
.
name
().
toUtf8
());
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
realtimeAvailable
,
"1"
);
}
if
(
OSM
::
tagValue
(
info
.
overlayNode
,
m_tagKeys
.
network
).
isEmpty
()
&&
!
loc
.
rentalVehicleStation
().
network
().
name
().
isEmpty
())
{
OSM
::
setTagValue
(
info
.
overlayNode
,
m_tagKeys
.
network
,
loc
.
rentalVehicleStation
().
network
().
name
().
toUtf8
());
}
return
info
;
...
...
src/map-publictransport-integration/locationqueryoverlayproxymodel.h
View file @
9710922c
...
...
@@ -61,6 +61,7 @@ private:
Info
nodeForRow
(
int
row
)
const
;
struct
{
OSM
::
TagKey
name
;
OSM
::
TagKey
amenity
;
OSM
::
TagKey
capacity
;
OSM
::
TagKey
realtimeAvailable
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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