Commit 52ea033c authored by Volker Krause's avatar Volker Krause
Browse files

Give free-floating rental kick scooters their own icon

parent b112375f
Pipeline #78655 passed with stage
in 17 seconds
......@@ -185,15 +185,26 @@ LocationQueryOverlayProxyModel::Info LocationQueryOverlayProxyModel::nodeForRow(
}
break;
case Location::RentedVehicle:
{
const auto vehicle = loc.data().value<RentalVehicle>();
// free floating vehicles have no matching OSM element, so no point in searching for one
info.overlayNode.id = m_data.dataSet().nextInternalId();
OSM::setTagValue(info.overlayNode, m_tagKeys.amenity, "bicycle_rental");
switch (vehicle.type()) {
case RentalVehicle::ElectricKickScooter:
OSM::setTagValue(info.overlayNode, m_tagKeys.amenity, "scooter_rental");
break;
default:
OSM::setTagValue(info.overlayNode, m_tagKeys.amenity, "bicycle_rental");
break;
}
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.rentalVehicle().network().name().isEmpty()) {
OSM::setTagValue(info.overlayNode, m_tagKeys.network, loc.rentalVehicle().network().name().toUtf8());
}
break;
}
case Location::Equipment:
break;
}
......
......@@ -117,6 +117,7 @@ static constexpr const ValueMapEntry amenity_map[] = {
{ "recycling", I18N_NOOP2("OSM::amenity/shop", "Recycling") },
{ "restaurant", I18N_NOOP2("OSM::amenity/shop", "Restaurant") },
{ "school", I18N_NOOP2("OSM::amenity/shop", "School") },
{ "scooter_rental", I18N_NOOP2("OSM::amenity/shop", "Kick Scooter Rental") },
{ "seafood", I18N_NOOP2("OSM::amenity/shop", "Seafood") },
{ "shoes", I18N_NOOP2("OSM::amenity/shop", "Shoes") },
{ "shop", I18N_NOOP2("OSM::amenity/shop", "Shop") },
......
......@@ -145,6 +145,7 @@
<file>icons/public_transport_tickets.svg</file>
<file>icons/recycling.svg</file>
<file>icons/sauna.svg</file>
<file>icons/scooter_rental.svg</file>
<file>icons/seafood.svg</file>
<file>icons/second_hand.svg</file>
<file>icons/shelter.svg</file>
......
......@@ -477,6 +477,13 @@ node|z20-[vending=public_transport_tickets] {
text-color: #27ae60;
}
*|z18-[amenity=scooter_rental][mx:realtime_available>0] {
icon-image: amenity;
icon-color: #27ae60;
text-color: #27ae60;
text: "";
}
// charging stations
node|z19-[amenity=charging_station] {
set .parking;
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="14"
height="14"
viewBox="0 0 14 14">
<style type="text/css" id="current-color-scheme" />
<path
d="M 3.5,0 C 2.119288,0 1,1.1192881 1,2.5 1,3.8807119 2.119288,5 3.5,5 4.425342,5 5.223985,4.4972377 5.65625,3.75 H 7 l 1,-1 1,1 1,-1 1,1 h 0.5 L 13,2.5 11.5,1.25 H 5.65625 C 5.223985,0.5027623 4.425342,0 3.5,0 Z m -1,2 C 2.776142,2 3,2.2238576 3,2.5 3,2.7761424 2.776142,3 2.5,3 2.223858,3 2,2.7761424 2,2.5 2,2.2238576 2.223858,2 2.5,2 Z"
id="rental-bicycle"
class="ColorScheme-Text"
style="fill:currentColor"/>
<g transform="matrix(-0.03632092,0,0,-0.03646474,13.071246,13.383235)" id="g10">
<path
class="ColorScheme-Text"
style="fill:currentColor;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 58.330229,37.531 c 0,12.438 -8.365229,20.802015 -20.799229,20.802015 -12.437,0 -20.794229,-8.364015 -20.794229,-20.802015 0,-12.437 8.357229,-20.805015 20.794229,-20.805015 12.434,0 20.799229,8.368015 20.799229,20.805015 z m 16.731771,0 C 75.062,16.805 58.258,0 37.531,0 16.805,0 0,16.805 0,37.531 c 0,20.727 16.805,37.532 37.531,37.532 20.727,0 37.531,-16.805 37.531,-37.532"/>
<path
class="ColorScheme-Text"
style="fill:currentColor;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 312.85323,37.531 c 0,12.438 -8.36123,20.802015 -20.79423,20.802015 -12.442,0 -20.45508,-8.364015 -20.45508,-20.802015 0,-12.437 8.01308,-20.805015 20.45508,-20.805015 12.433,0 20.79423,8.368015 20.79423,20.805015 z m 16.73277,0 C 329.586,16.805 312.781,0 292.059,0 c -20.731,0 -37.532,16.805 -37.532,37.531 0,20.727 16.801,37.532 37.532,37.532 20.722,0 37.527,-16.805 37.527,-37.532"/>
<path
class="ColorScheme-Text"
style="fill:currentColor;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 74.106463,187.57723 59.462652,106.62812 105.27977,49.66 l 60.94323,0.098 9.523,-0.039 63.52,-0.059 -3.786,-4.509406 56.579,0.008 c 3.832,0 6.941,-3.795594 6.941,-7.627594 0,-3.835 -3.109,-7.630594 -6.941,-7.630594 l -66.278,0.024 L 220.93,23.68 H 102.379 L 91.391,34.817 v 7.925 L 54.71008,89.353031 44.750154,36.567 c -0.48,-3.43 -3.758154,-5.981 -7.219154,-5.981 -3.836,0 -6.941,3.11 -6.941,6.945 0,0.325 0.019,0.649 0.066,0.969 l 28.426,149.07723 1.691812,7.26404 c 0,0 2.957153,6.37008 6.789103,6.38966 l 40.187085,0.2053 c 3.83195,0.0196 6.941,-3.109 6.941,-6.941 0,-3.836 -3.109,-7.97439 -6.941,-7.97439 l -33.643537,0.028"/>
</g>
</svg>
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: https://github.com/gravitystorm/openstreetmap-carto
SPDX-FileCopyrightText: https://commons.wikimedia.org/wiki/File:Elektrokleinstfahrzeuge_im_Sinne_der_Elektrokleinstfahrzeuge-Verordnung_(eKFV),_Sinnbild_nach_§_39_StVO,_StVO_2020.svg
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment