[ios] Add wheelchair info to place page

Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
David Martinez 2024-02-04 22:20:13 +01:00 committed by Viktor Govako
parent d7923f5512
commit 12aab83cce
5 changed files with 37 additions and 0 deletions

View file

@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, readonly, nullable) NSString *level;
@property(nonatomic, readonly, nullable) NSString *atm;
@property(nonatomic, readonly, nullable) NSString *capacity;
@property(nonatomic, readonly, nullable) NSString *wheelchair;
@end

View file

@ -4,6 +4,8 @@
#import <CoreApi/StringUtils.h>
#include "platform/localization.hpp"
#include "indexer/validate_and_format_contacts.hpp"
#include "indexer/kayak.hpp"
@ -76,6 +78,7 @@ using namespace osm;
break;
case MetadataID::FMD_LEVEL: _level = ToNSString(value); break;
case MetadataID::FMD_CAPACITY: _capacity = [NSString stringWithFormat:NSLocalizedString(@"capacity", nil), ToNSString(value)]; break;
case MetadataID::FMD_WHEELCHAIR: _wheelchair = ToNSString(platform::GetLocalizedTypeName(value)); break;
default:
break;
}

View file

@ -0,0 +1,24 @@
{
"images" : [
{
"filename" : "ic_wheelchair_white.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
<path d="m30.327 12c-1.3184 0-2.388 1.0669-2.388 2.3851 0 1.3183 1.0696 2.388 2.388 2.388 1.3182 0 2.388-1.0696 2.388-2.388 0-1.3182-1.0697-2.3851-2.388-2.3851zm-8.1593 1.156c-0.36747-0.01946-0.73901 0.10069-1.0266 0.35721l-3.1895 2.8464c-0.5877 0.5242-0.63955 1.4261-0.1153 2.0138 0.52428 0.58766 1.4262 0.63968 2.0138 0.1153l2.419-2.1572 1.9969 1.1616-3.527 4.0164c-1.4633 0.23866-2.7803 0.91509-3.8139 1.8873l1.8422 1.8422c0.83304-0.75747 1.9408-1.2207 3.1529-1.2207 2.5851 0 4.6857 2.1033 4.6857 4.6887 0 1.212-0.46048 2.3198-1.2178 3.1529l1.8422 1.8422c1.2276-1.3049 1.98-3.0622 1.98-4.9952 0-1.1516-0.26712-2.2407-0.74253-3.2092l1.9239-0.10689-0.46688 5.7433c-0.06402 0.78493 0.52009 1.4716 1.3051 1.5357 0.03929 0.0034 0.07929 0.0057 0.11812 0.0057 0.73497 0 1.3597-0.56526 1.4204-1.3107l0.59909-7.3719c0.03354-0.41084-0.11182-0.81586-0.39939-1.1109-0.2877-0.2952-0.68894-0.45282-1.0997-0.43033l-4.9726 0.27845 2.7367-3.1164c0.38979-0.44394 0.50227-1.0351 0.35159-1.5639-0.07955-0.36233-0.30137-0.69222-0.63846-0.90283-0.01024-0.0075-6.5394-3.8027-6.5394-3.8027-0.19997-0.1161-0.41798-0.17665-0.63846-0.1884zm-5.9909 11.059c-0.97051 1.2386-1.5497 2.7961-1.5497 4.4918 0 4.0275 3.2654 7.293 7.293 7.293 1.6955 0 3.2532-0.57913 4.4918-1.5497l-1.862-1.8647c-0.75056 0.51051-1.6556 0.81004-2.6297 0.81004-2.5851 0-4.6887-2.1033-4.6887-4.6887 0-0.97429 0.29657-1.8792 0.80722-2.6297l-1.862-1.862z" fill="#fff" stroke-width=".92306"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -95,6 +95,7 @@ class PlacePageInfoViewController: UIViewController {
private var levelView: InfoItemViewController?
private var coordinatesView: InfoItemViewController?
private var capacityView: InfoItemViewController?
private var wheelchairView: InfoItemViewController?
var placePageInfoData: PlacePageInfoData!
weak var delegate: PlacePageInfoViewControllerDelegate?
@ -197,6 +198,10 @@ class PlacePageInfoViewController: UIViewController {
capacityView = createInfoItem(capacity, icon: UIImage(named: "ic_placepage_capacity"))
}
if let wheelchair = placePageInfoData.wheelchair {
wheelchairView = createInfoItem(wheelchair, icon: UIImage(named: "ic_placepage_wheelchair"))
}
if let email = placePageInfoData.email {
emailView = createInfoItem(email,
icon: UIImage(named: "ic_placepage_email"),