Compare commits

..

8 Commits

Author SHA1 Message Date
map-per
c5a9eddf2a [editor] Add more complex types and support healthcare and education
Signed-off-by: map-per <map-per@gmx.de>
2025-12-20 16:37:38 +01:00
Yannik Bloscheck
4398e492b8 [iOS] Added new editor files to their Xcode projects
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2025-12-19 19:45:31 +01:00
map-per
1907e039e3 [editor] Support complex POI types in the editor (#2855)
Signed-off-by: map-per <map-per@gmx.de>
2025-12-19 19:45:31 +01:00
map-per
26bad5dffb [editor] 'discard' and 'delete' buttons only available when nothing was uploaded to OSM
Signed-off-by: map-per <map-per@gmx.de>
2025-12-19 17:37:36 +01:00
Konstantin Pastbin
4f2b479b2c December R2 release notes
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2025-12-19 16:38:10 +01:00
Viktor Govako
a972552155 [drape] Refactor UpdateVisualScale.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
2025-12-19 16:26:51 +01:00
Konstantin Pastbin
dc54c45482 [planet] Update map data to 251217
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2025-12-19 16:01:17 +01:00
Codeberg Translate
1975b6a0f0 [strings] Update from Codeberg Translate
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: ERYpTION <eryption@noreply.codeberg.org>
Co-authored-by: Edgarsons <edgarsons@noreply.codeberg.org>
Co-authored-by: JanezPavelZebovec <janezpavelzebovec@noreply.codeberg.org>
Co-authored-by: Outbreak2096 <outbreak2096@noreply.codeberg.org>
Co-authored-by: Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Co-authored-by: patepelo <patepelo@noreply.codeberg.org>
Translation: CoMaps/Android - Map Feature Types
Translation: CoMaps/Android UI Strings
Translation: CoMaps/iOS - Map Feature Types
Translation: CoMaps/iOS UI Strings
2025-12-19 12:49:54 +00:00
58 changed files with 3208 additions and 2727 deletions

View File

@@ -1,10 +1,8 @@
• OpenStreetMap-Daten vom 9. Dezember • OpenStreetMap Daten vom 17. Dezember
• Material 3 Design • Map download server nun wählbar
Im OSM-Editor können nun Ladestationen hinzugefügt werden Warnung über veraltete Karten hinzugefügt + Knopf zum updaten
Schuko und Typ E Ladestationen hinzugefügt Vermeidung von Parkplatzwegen im Routing
Verbesserte Suchvorschläge Neuer Zoombutton
Litauische und lettische Sprachankündigungen Verbesserte Französchische Suchsynonme
Die Fahranweisungen wurden vergrößert OSM editor: Maximale Länge für OSM-Tags werden nun geprüft
• Der Zoomlevel passt sich an die Distanz zur nächsten Abbiegung an Mehr auf codeberg.org/comaps/comaps/releases
• Neue Anordnung der Einstellungen
Weitere Einzelheiten auf codeberg.org/comaps/comaps/releases

View File

@@ -1,10 +1,8 @@
• OpenStreetMap data as of December 9 • OpenStreetMap data as of December 17
Use Material 3 themes Make map download server configurable
Support charging sockets in OSM Editor Added info about outdated maps and an update button to the selected place info card
• Added schuko/type-E charge sockets • Avoid using parking aisles for routing
Improved search results ranking Changed shape of zoom buttons
Enabled Lithuanian and Latvian in voice announcements Improved French search synonyms
Improved size of driving indications OSM editor: check length limit for OSM tags in value validation
• Base zoom level on distance to next turn
• Reordered settings
More details on codeberg.org/comaps/comaps/releases More details on codeberg.org/comaps/comaps/releases

View File

@@ -1,11 +0,0 @@
• Datos de OpenStreetMap a fecha 9/12.
• Uso de temas Material 3.
• Compatibilidad con enchufes de recarga en Editor.
• Se añaden enchufes de recarga schuko/tipo E.
• Se mejora la búsqueda.
• Se habilitan el lituano y el letón en las indicaciones de voz.
• Se aumenta el tamaño de las indicaciones de conducción.
• Nivel de zoom base según la distancia al siguiente giro.
• Se han reordenado los ajustes.
Más detalles en codeberg.org/comaps/comaps/releases

View File

@@ -1,10 +1,8 @@
• Données OpenStreetMap du 9 Décembre • Données OpenStreetMap du 17 décembre
Utilisation de Material 3 Serveur de téléchargement de cartes configurable
Support de l'édition des bornes de recharge dans l'éditeur OSM Ajout d'un message d'avertissement pour les cartes trop anciennes
Ajout du type de prise schuko/type-E Évitement des allées de parking dans les itinéraires
Amélioration de l'ordre des résultats de recherche Mise à jour de l'apparence des boutons de zooms
• Ajout du lituanien et du letton dans le guidage vocal • Amélioration des synonymes de recherche en français
Amélioration de la taille des instructions dans la navigation Editeur OSM: vérification de la taille limite des tags OSM
• Niveau de zoom basé sur la distance jusquau prochain virage Plus d'informations sur codeberg.org/comaps/comaps/releases
• Réorganisation des paramètres
Plus de détails sur codeberg.org/comaps/comaps/releases

View File

@@ -1,10 +0,0 @@
• Podaci OpenStreetMap karte od 9. prosinca
• Korištenje Material 3 tema
• Podrška za utičnice za punjenje u OSM Editoru
• Dodane šuko/tip-E utičnice
• Poboljšano rangiranje rezultata pretraživanja
• Omogućeni litvanski i latvijski jezici u glasovnim najavama
• Povećana veličina indikatora vožnje
• Razina zumiranja se mijenja ovisno o udaljenosti do sljedećeg skretanja
• Promijenjen redoslijed postavki
Više detalja na codeberg.org/comaps/comaps/releases

View File

@@ -1,10 +0,0 @@
• Dane OpenStreetMap z 9 grudnia
• Użycie motywów Material 3
• Obsługa gniazd ładowania w Edytorze OSM
• Dodane gniazda ładowania schuko/type-E
• Poprawiony ranking wyników wyszukiwania
• Dodane litewskie i łotewskie komunikaty głosowe
• Poprawiony rozmiar znaków drogowych
• Poziom powiększenia oparty na odległości do następnego manewru
• Zmieniona kolejność ustawień
Więcej szczegółów na codeberg.org/comaps/comaps/releases

View File

@@ -1,10 +1,8 @@
• Dados OpenStreetMap atualizados em 9 de dezembro • Dados OSM de 17/12
Uso do estilo Material 3 Servidor de download de mapas configurável
Suporte para tomadas de carregamento no Editor OSM Adição de informações sobre mapas desatualizados e um botão de atualização ao cartão de informações do local selecionado
Adição de tomadas de carregamento Schuko/Tipo E Evita o uso de corredores de estacionamento para roteamento
Melhoria na classificação dos resultados de busca Formato dos botões de zoom alterado
Adição dos idiomas letão e lituano nas orientações por voz Sinônimos de busca em francês aprimorados
Melhoria no tamanho das indicações de direção Editor OSM: verificação do limite de comprimento das tags do OSM na validação de valores
• Nível de zoom baseado em distância até a próxima curva
• Configurações reordenadas
Mais detalhes em codeberg.org/comaps/comaps/releases Mais detalhes em codeberg.org/comaps/comaps/releases

View File

@@ -0,0 +1,8 @@
• Карты OpenStreetMap от 17 декабря
• Возможность настройки сервера для скачивания карт
• Добавлена ​​информация об устаревании карт и ​​кнопка обновления (при выборе места на карте)
• Парковочные проезды больше не используются для транзитной маршрутизации
• Изменены кнопки масштабирования карты
На карту добавлены ирригационные гидранты
• Редактор OSM: проверка максимальной длины OSM тегов
Подробнее на codeberg.org/comaps/comaps/releases

View File

@@ -948,7 +948,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE); mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE);
if (Editor.nativeIsMapObjectUploaded()) if (Editor.nativeAreSomeFeatureChangesUploaded())
{ {
mReset.setText(R.string.editor_place_doesnt_exist); mReset.setText(R.string.editor_place_doesnt_exist);
return; return;
@@ -966,7 +966,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
private void reset() private void reset()
{ {
if (Editor.nativeIsMapObjectUploaded()) if (Editor.nativeAreSomeFeatureChangesUploaded())
{ {
placeDoesntExist(); placeDoesntExist();
return; return;

View File

@@ -489,7 +489,7 @@
<string name="placepage_edit_bookmark_button">Rediger bogmærke</string> <string name="placepage_edit_bookmark_button">Rediger bogmærke</string>
<string name="placepage_personal_notes_hint">Personlige notater (tekst eller html)</string> <string name="placepage_personal_notes_hint">Personlige notater (tekst eller html)</string>
<string name="editor_reset_edits_message">Kassér alle lokale ændringer?</string> <string name="editor_reset_edits_message">Kassér alle lokale ændringer?</string>
<string name="editor_reset_edits_button">Kassér</string> <string name="editor_reset_edits_button">Kassér ændringer</string>
<string name="editor_remove_place_message">Slet tilføjet sted?</string> <string name="editor_remove_place_message">Slet tilføjet sted?</string>
<string name="editor_remove_place_button">Slet</string> <string name="editor_remove_place_button">Slet</string>
<string name="editor_place_doesnt_exist">Stedet eksisterer ikke</string> <string name="editor_place_doesnt_exist">Stedet eksisterer ikke</string>

View File

@@ -497,7 +497,7 @@
<string name="placepage_edit_bookmark_button">Muuda järjehoidjat</string> <string name="placepage_edit_bookmark_button">Muuda järjehoidjat</string>
<string name="placepage_personal_notes_hint">Isiklikud märkmed (tekst või html)</string> <string name="placepage_personal_notes_hint">Isiklikud märkmed (tekst või html)</string>
<string name="editor_reset_edits_message">Kas loobud kõigist kohalikest muudatustest?</string> <string name="editor_reset_edits_message">Kas loobud kõigist kohalikest muudatustest?</string>
<string name="editor_reset_edits_button">Loobu</string> <string name="editor_reset_edits_button">Loobu muudatustest</string>
<string name="editor_remove_place_message">Kas kustutad lisatud koha?</string> <string name="editor_remove_place_message">Kas kustutad lisatud koha?</string>
<string name="editor_remove_place_button">Kustuta</string> <string name="editor_remove_place_button">Kustuta</string>
<string name="editor_place_doesnt_exist">Kohta pole olemas</string> <string name="editor_place_doesnt_exist">Kohta pole olemas</string>
@@ -911,4 +911,10 @@
<string name="place_page_update_too_old_map">Uuenda piirkonna kaardiandmeid</string> <string name="place_page_update_too_old_map">Uuenda piirkonna kaardiandmeid</string>
<string name="place_page_too_old_to_edit">Kuna kaardiandmed on liiga vanad, siis OpenStreetMapi muutmise võimalus on lülitatud välja.</string> <string name="place_page_too_old_to_edit">Kuna kaardiandmed on liiga vanad, siis OpenStreetMapi muutmise võimalus on lülitatud välja.</string>
<string name="navigation_start_tts_disabled_message">Hääljuhiste kasutamine on lülitatud välja: kõnesünteesimootorit pole saadaval</string> <string name="navigation_start_tts_disabled_message">Hääljuhiste kasutamine on lülitatud välja: kõnesünteesimootorit pole saadaval</string>
<string name="download_resources_custom_url_summary_none">Pole määratud</string>
<string name="advanced">Täiendavad seadistused</string>
<string name="download_resources_custom_url_title">Sinu oma kaardiserver</string>
<string name="download_resources_custom_url_message">Kui tahad kasutada oma kaardiserverit, siis lisa ta siia. CoMapsi vaikimisi serveri kasutamiseks jäta tühjaks.</string>
<string name="download_resources_custom_url_hint">https://cdn-fi-1.comaps.app/</string>
<string name="download_resources_custom_url_error_scheme">Palun sisesta täismahuline võrguaadress, mille alguses on https:// ja lõpus /</string>
</resources> </resources>

View File

@@ -851,4 +851,6 @@
<string name="place_page_update_too_old_map">Atjaunināt karšu apgabalu</string> <string name="place_page_update_too_old_map">Atjaunināt karšu apgabalu</string>
<string name="place_page_too_old_to_edit">OpenStreetMap labošana ir atspējota, jo kartes dati ir pārāk veci.</string> <string name="place_page_too_old_to_edit">OpenStreetMap labošana ir atspējota, jo kartes dati ir pārāk veci.</string>
<string name="navigation_start_tts_disabled_message">Balss norādes atspējotas: nav pieejams teksta pārveidošanas runā dzinējs</string> <string name="navigation_start_tts_disabled_message">Balss norādes atspējotas: nav pieejams teksta pārveidošanas runā dzinējs</string>
<string name="prefs_speed_cameras_information">Brīdinājumi par ātruma noteikšanas kamerā ir atspējoti valstīs, kurās šādus brīdinājumus aizliedz vietējais likums.</string>
<string name="navigation_start_tts_message">"Uzsāk navigāciju, balss norāžu valoda: "</string>
</resources> </resources>

View File

@@ -511,7 +511,7 @@
<string name="placepage_edit_bookmark_button">编辑书签</string> <string name="placepage_edit_bookmark_button">编辑书签</string>
<string name="placepage_personal_notes_hint">个人注记(文字或 html</string> <string name="placepage_personal_notes_hint">个人注记(文字或 html</string>
<string name="editor_reset_edits_message">舍弃所有本地更改?</string> <string name="editor_reset_edits_message">舍弃所有本地更改?</string>
<string name="editor_reset_edits_button">舍弃</string> <string name="editor_reset_edits_button">舍弃更改</string>
<string name="editor_remove_place_message">删除已添加的地点?</string> <string name="editor_remove_place_message">删除已添加的地点?</string>
<string name="editor_remove_place_button">删除</string> <string name="editor_remove_place_button">删除</string>
<string name="editor_place_doesnt_exist">该地点不存在</string> <string name="editor_place_doesnt_exist">该地点不存在</string>
@@ -917,4 +917,10 @@
<string name="place_page_app_too_old_description">您当前的地图数据非常旧,请更新 CoMaps 应用。</string> <string name="place_page_app_too_old_description">您当前的地图数据非常旧,请更新 CoMaps 应用。</string>
<string name="place_page_update_too_old_map">更新地图区域</string> <string name="place_page_update_too_old_map">更新地图区域</string>
<string name="place_page_too_old_to_edit">由于地图数据太旧OpenStreetMap 编辑被禁用。</string> <string name="place_page_too_old_to_edit">由于地图数据太旧OpenStreetMap 编辑被禁用。</string>
<string name="download_resources_custom_url_hint">https://cdn-fi-1.comaps.app/</string>
<string name="download_resources_custom_url_summary_none">未设置</string>
<string name="download_resources_custom_url_error_scheme">请输入以 https:// 开头、以 / 结尾的完整 URL</string>
<string name="advanced">高级</string>
<string name="download_resources_custom_url_title">自定义地图服务器</string>
<string name="download_resources_custom_url_message">覆盖用于地图下载的默认地图下载服务器。留空则使用 CoMaps 默认服务器。</string>
</resources> </resources>

View File

@@ -0,0 +1 @@
../../../../../data/mapcss-mapping.csv
1 ../../../../../data/mapcss-mapping.csv

View File

@@ -580,9 +580,9 @@ JNIEXPORT jint JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeGetMapObject
return static_cast<jint>(osm::Editor::Instance().GetFeatureStatus(g_editableMapObject.GetID())); return static_cast<jint>(osm::Editor::Instance().GetFeatureStatus(g_editableMapObject.GetID()));
} }
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeIsMapObjectUploaded(JNIEnv * env, jclass clazz) JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_editor_Editor_nativeAreSomeFeatureChangesUploaded(JNIEnv * env, jclass clazz)
{ {
return osm::Editor::Instance().IsFeatureUploaded(g_editableMapObject.GetID().m_mwmId, return osm::Editor::Instance().AreSomeFeatureChangesUploaded(g_editableMapObject.GetID().m_mwmId,
g_editableMapObject.GetID().m_index); g_editableMapObject.GetID().m_index);
} }

View File

@@ -190,5 +190,5 @@ public final class Editor
@FeatureStatus @FeatureStatus
public static native int nativeGetMapObjectStatus(); public static native int nativeGetMapObjectStatus();
public static native boolean nativeIsMapObjectUploaded(); public static native boolean nativeAreSomeFeatureChangesUploaded();
} }

View File

@@ -1122,7 +1122,7 @@
<string name="type.shop.doityourself">Tienda de bricolaje</string> <string name="type.shop.doityourself">Tienda de bricolaje</string>
<string name="type.shop.dry_cleaning">Tintorería</string> <string name="type.shop.dry_cleaning">Tintorería</string>
<string name="type.shop.electronics">Electrónica</string> <string name="type.shop.electronics">Electrónica</string>
<string name="type.shop.erotic">Sex Shop</string> <string name="type.shop.erotic">Tienda erótica</string>
<string name="type.shop.fabric">Tienda de telas</string> <string name="type.shop.fabric">Tienda de telas</string>
<string name="type.shop.farm">Tienda de alimentos de granja</string> <string name="type.shop.farm">Tienda de alimentos de granja</string>
<string name="type.shop.fashion_accessories">Accesorios de moda</string> <string name="type.shop.fashion_accessories">Accesorios de moda</string>

View File

@@ -457,4 +457,12 @@
<string name="type.entrance.exit">Izhod (samo)</string> <string name="type.entrance.exit">Izhod (samo)</string>
<string name="type.healthcare.laboratory">Zdravstveni laboratorij</string> <string name="type.healthcare.laboratory">Zdravstveni laboratorij</string>
<string name="type.healthcare.psychotherapist">Psihoterapevt</string> <string name="type.healthcare.psychotherapist">Psihoterapevt</string>
<string name="type.highway.cycleway.tunnel">Predor</string>
<string name="type.highway.elevator">Dvigalo</string>
<string name="type.highway.footway">Pešpot</string>
<string name="type.highway.footway.sidewalk">Pločnik</string>
<string name="type.highway.footway.crossing">Prehod za pešce</string>
<string name="type.highway.footway.area">Površina za pešce</string>
<string name="type.highway.footway.bridge">Most za pešce</string>
<string name="type.highway.footway.tunnel">Predor za pešce</string>
</resources> </resources>

View File

@@ -179,7 +179,7 @@
<!-- Compared to wilderness_hut its smaller and simpler, without a fireplace. --> <!-- Compared to wilderness_hut its smaller and simpler, without a fireplace. -->
<string name="type.amenity.shelter.basic_hut">Bivouac Hut</string> <string name="type.amenity.shelter.basic_hut">Bivouac Hut</string>
<!-- A traditional 3-walled shelter (one side open), suitable for overnight camping. --> <!-- A traditional 3-walled shelter (one side open), suitable for overnight camping. -->
<string name="type.amenity.shelter.lean_to">Lean-to Shelter</string> <string name="type.amenity.shelter.lean_to">Lean-to Sleep Shelter</string>
<string name="type.amenity.public_bath">Public Bath</string> <string name="type.amenity.public_bath">Public Bath</string>
<string name="type.amenity.shower">Shower</string> <string name="type.amenity.shower">Shower</string>
<string name="type.amenity.stripclub">Stripclub</string> <string name="type.amenity.stripclub">Stripclub</string>
@@ -198,7 +198,7 @@
<string name="type.amenity.vending_machine.food">Food Dispenser</string> <string name="type.amenity.vending_machine.food">Food Dispenser</string>
<string name="type.amenity.vending_machine.newspapers">Newspaper Dispenser</string> <string name="type.amenity.vending_machine.newspapers">Newspaper Dispenser</string>
<string name="type.amenity.vending_machine.parking_tickets">Parking Meter</string> <string name="type.amenity.vending_machine.parking_tickets">Parking Meter</string>
<string name="type.amenity.vending_machine.public_transport_tickets">Ticket Machine</string> <string name="type.amenity.vending_machine.public_transport_tickets">Public Transport Ticket Machine</string>
<string name="type.amenity.vending_machine.sweets">Sweets Dispenser</string> <string name="type.amenity.vending_machine.sweets">Sweets Dispenser</string>
<string name="type.amenity.vending_machine.excrement_bags">Excrement Bags Dispenser</string> <string name="type.amenity.vending_machine.excrement_bags">Excrement Bags Dispenser</string>
<string name="type.amenity.parcel_locker">Parcel Locker</string> <string name="type.amenity.parcel_locker">Parcel Locker</string>

View File

@@ -81,6 +81,9 @@
"amenity-townhall": "3Town Hall|townhall|city hall|guildhall|village hall|4municipal hall|civic centre", "amenity-townhall": "3Town Hall|townhall|city hall|guildhall|village hall|4municipal hall|civic centre",
"tourism-attraction|@category_tourism": "4Attraction|U+1F3A0|U+1F3A1|U+1F3A2|U+1F3AA", "tourism-attraction|@category_tourism": "4Attraction|U+1F3A0|U+1F3A1|U+1F3A2|U+1F3AA",
"tourism-artwork": "3Artwork|U+1F3A8", "tourism-artwork": "3Artwork|U+1F3A8",
"tourism-artwork-sculpture": "Sculpture|Artwork|U+1F3A8",
"tourism-artwork-statue": "Statue|Artwork|U+1F3A8",
"tourism-artwork-painting": "Painting|Artwork|U+1F3A8",
"tourism-viewpoint|@category_tourism": "4Viewpoint|Vista", "tourism-viewpoint|@category_tourism": "4Viewpoint|Vista",
"tourism-information": "4Tourist Information|4information|U+1F481", "tourism-information": "4Tourist Information|4information|U+1F481",
"tourism-picnic_site|amenity-bbq|leisure-picnic_table": "3Picnic Site|picnic|Barbecue Grill|Picnic Table|bbq|Barbec", "tourism-picnic_site|amenity-bbq|leisure-picnic_table": "3Picnic Site|picnic|Barbecue Grill|Picnic Table|bbq|Barbec",
@@ -197,7 +200,7 @@
"amenity-school": "3School|U+1F392|U+1F3EB", "amenity-school": "3School|U+1F392|U+1F3EB",
"amenity-shelter": "4Shelter|refuge", "amenity-shelter": "4Shelter|refuge",
"amenity-shelter-basic_hut": "basic hut|3Bivouac Hut|Bivvy|Bothy|Hut", "amenity-shelter-basic_hut": "basic hut|3Bivouac Hut|Bivvy|Bothy|Hut",
"amenity-shelter-lean_to": "3Lean-to Shelter|4Shelter|Refuge|lean shelter|shelter", "amenity-shelter-lean_to": "3Lean-to Sleep Shelter|4Shelter|Refuge|lean shelter|Lean-to Shelter",
"amenity-stripclub": "Stripclub|strip club", "amenity-stripclub": "Stripclub|strip club",
"amenity-telephone": "2Phone|U+260E|U+1F4DE|5Telephone", "amenity-telephone": "2Phone|U+260E|U+1F4DE|5Telephone",
"@category_toilet": "3Toilet|toilets|4Restroom|potty|WC|water closet", "@category_toilet": "3Toilet|toilets|4Restroom|potty|WC|water closet",
@@ -365,20 +368,21 @@
"shop-pet|@shop": "3Pet", "shop-pet|@shop": "3Pet",
"tourism-zoo|@category_tourism|@category_children": "2Zoo", "tourism-zoo|@category_tourism|@category_children": "2Zoo",
"attraction-animal": "Animal Enclosure", "attraction-animal": "Animal Enclosure",
"tourism-information-office|amenity-ranger_station|@category_tourism": "4Tourism office|6Ranger station", "tourism-information-office|amenity-ranger_station|@category_tourism": "4Tourist Office|Tourism office|6Ranger station|Information",
"tourism-information-visitor_centre|amenity-ranger_station|@category_tourism": "3Visitor centre|6Ranger station", "tourism-information-visitor_centre|amenity-ranger_station|@category_tourism": "3Visitor centre|6Ranger station|Information",
"amenity-community_centre": "4Community centre", "amenity-community_centre": "4Community centre",
"amenity-compressed_air": "6Compressed air", "amenity-compressed_air": "6Compressed air",
"amenity-courthouse": "4Courthouse", "amenity-courthouse": "4Courthouse",
"amenity-vending_machine-cigarettes": "4Cigarette dispenser", "amenity-vending_machine": "Vending Machine",
"amenity-vending_machine-coffee": "4Coffee dispenser|Coffee", "amenity-vending_machine-cigarettes": "4Cigarette dispenser|Vending Machine",
"amenity-vending_machine-condoms": "4Condoms dispenser|Condoms|Condomat", "amenity-vending_machine-coffee": "4Coffee dispenser|Coffee|Vending Machine",
"amenity-vending_machine-drinks": "4Drinks dispenser|4Beverages", "amenity-vending_machine-condoms": "4Condoms dispenser|Condoms|Condomat|Vending Machine",
"amenity-vending_machine-food|@category_food": "4Food dispenser|Food|Snacks", "amenity-vending_machine-drinks": "4Drinks dispenser|4Beverages|Vending Machine",
"amenity-vending_machine-food|@category_food": "4Food dispenser|Food|Snacks|Vending Machine",
"amenity-vending_machine-parking_tickets|@category_parking": "4Parking tickets|3Pay and Display|Parkomat|Parking Meter", "amenity-vending_machine-parking_tickets|@category_parking": "4Parking tickets|3Pay and Display|Parkomat|Parking Meter",
"amenity-vending_machine-public_transport_tickets|@category_transport": "6Ticket machine|Transport Tickets|Tickets|4Fare machine|Bus tickets|Train tickets|Ticketing", "amenity-vending_machine-public_transport_tickets|@category_transport": "4Public Transport Ticket Machine|6Ticket machine|Transport Tickets|Tickets|4Fare machine|Bus tickets|Train tickets|Ticketing|Vending Machine",
"amenity-vending_machine-newspapers": "4Newspaper Dispenser|Newspapers", "amenity-vending_machine-newspapers": "4Newspaper Dispenser|Newspapers",
"amenity-vending_machine-sweets": "4Sweets Dispenser|Sweets|4Candies|Lollies", "amenity-vending_machine-sweets": "4Sweets Dispenser|Sweets|4Candies|Lollies|Vending Machine",
"amenity-vending_machine-excrement_bags": "5Excrement Bags Dispenser|4Poop Bags|3Dog Poop Bags|Animal Waste", "amenity-vending_machine-excrement_bags": "5Excrement Bags Dispenser|4Poop Bags|3Dog Poop Bags|Animal Waste",
"amenity-parcel_locker|@category_post": "4Parcel Locker|4Parcel Pickup", "amenity-parcel_locker|@category_post": "4Parcel Locker|4Parcel Pickup",
"shop-outpost": "4Pickup Point|4Parcel Pickup", "shop-outpost": "4Pickup Point|4Parcel Pickup",
@@ -398,6 +402,7 @@
"tourism-chalet|@category_hotel": "5Holiday Cottage|5vacation home|4Chalet", "tourism-chalet|@category_hotel": "5Holiday Cottage|5vacation home|4Chalet",
"tourism-information-board": "Information Board", "tourism-information-board": "Information Board",
"tourism-information-map": "Tourist map|map|4Information", "tourism-information-map": "Tourist map|map|4Information",
"tourism-information-guidepost": "Guidepost",
"aerialway-station": "Aerialway Station|5Cable car station", "aerialway-station": "Aerialway Station|5Cable car station",
"aeroway-helipad": "4Helipad", "aeroway-helipad": "4Helipad",
"barrier-border_control": "4Border Control", "barrier-border_control": "4Border Control",
@@ -499,6 +504,7 @@
"leisure-track": "Track", "leisure-track": "Track",
"leisure-bandstand": "5Bandstand", "leisure-bandstand": "5Bandstand",
"power-plant": "Power Plant", "power-plant": "Power Plant",
"power-generator-wind": "Wind Generator",
"shop-auction|@category_secondhand": "4Auction|Auctioneer|Auction House", "shop-auction|@category_secondhand": "4Auction|Auctioneer|Auction House",
"shop-collector|@category_shopping|@category_secondhand": "Collectables|Collector", "shop-collector|@category_shopping|@category_secondhand": "Collectables|Collector",
"man_made-cairn": "4Cairn", "man_made-cairn": "4Cairn",

File diff suppressed because it is too large Load Diff

View File

@@ -122,10 +122,10 @@
</value> </value>
</field> </field>
<!-- Uncomment this and other ele fields when the code supports it. --> <!-- Uncomment this and other ele fields when the code supports it. -->
<!-- <field name="ele">--> <!-- <field name="ele"> -->
<!-- <tag k="ele" />--> <!-- <tag k="ele" /> -->
<!-- <value type="number" />--> <!-- <value type="number" /> -->
<!-- </field>--> <!-- </field> -->
<!-- Skipping FMD_TURN_LANES. --> <!-- Skipping FMD_TURN_LANES. -->
<field name="email"> <field name="email">
<tag k="email" /> <tag k="email" />
@@ -135,9 +135,9 @@
<tag k="addr:postcode" /> <tag k="addr:postcode" />
</field> </field>
<!-- Uncomment this and other wiki fields when the code supports it. --> <!-- Uncomment this and other wiki fields when the code supports it. -->
<!-- <field name="wikipedia" editable="no">--> <!-- <field name="wikipedia" editable="no"> -->
<!-- <tag k="wikipedia" />--> <!-- <tag k="wikipedia" /> -->
<!-- </field>--> <!-- </field> -->
<!-- Skipping FMD_MAXSPEED. --> <!-- Skipping FMD_MAXSPEED. -->
<field name="flats"> <field name="flats">
<tag k="addr:flats" /> <tag k="addr:flats" />
@@ -236,11 +236,11 @@
<types> <types>
<type id="aeroway-aerodrome" editable="no"> <type id="aeroway-aerodrome" editable="no">
<include group="poi" /> <include group="poi" />
<!-- <include field="ele" />--> <!-- <include field="ele" /> -->
</type> </type>
<type id="aeroway-airport" editable="no"> <type id="aeroway-airport" editable="no">
<include group="poi" /> <include group="poi" />
<!-- <include field="ele" />--> <!-- <include field="ele" /> -->
</type> </type>
<type id="amenity-atm" group="banking" priority="low"> <type id="amenity-atm" group="banking" priority="low">
<include field="opening_hours" /> <include field="opening_hours" />
@@ -394,32 +394,25 @@
<type id="amenity-pharmacy" group="shop"> <type id="amenity-pharmacy" group="shop">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-buddhist">
<type id="amenity-place_of_worship-buddhist" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-christian">
<type id="amenity-place_of_worship-christian" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-hindu">
<type id="amenity-place_of_worship-hindu" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-jewish">
<type id="amenity-place_of_worship-jewish" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-muslim">
<type id="amenity-place_of_worship-muslim" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-shinto">
<type id="amenity-place_of_worship-shinto" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="amenity-place_of_worship-taoist">
<type id="amenity-place_of_worship-taoist" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="amenity-place_of_worship"> <type id="amenity-place_of_worship">
@@ -518,6 +511,16 @@
<type id="amenity-animal_shelter"> <type id="amenity-animal_shelter">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="amenity-charging_station-motorcar-small">
<include group="charge_sockets" />
<include field="opening_hours" />
<include field="operator" />
</type>
<type id="amenity-charging_station-bicycle">
<include group="charge_sockets" />
<include field="opening_hours" />
<include field="operator" />
</type>
<type id="amenity-charging_station"> <type id="amenity-charging_station">
<include group="charge_sockets" /> <include group="charge_sockets" />
<include field="opening_hours" /> <include field="opening_hours" />
@@ -632,23 +635,23 @@
</type> </type>
<type id="historic-archaeological_site" group="historic"> <type id="historic-archaeological_site" group="historic">
<include group="poi" /> <include group="poi" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="historic-castle" group="historic"> <type id="historic-castle" group="historic">
<include group="poi" /> <include group="poi" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="historic-memorial" group="historic"> <type id="historic-memorial" group="historic">
<include field="name" /> <include field="name" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="historic-monument" group="historic"> <type id="historic-monument" group="historic">
<include field="name" /> <include field="name" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="historic-ruins" group="historic"> <type id="historic-ruins" group="historic">
<include field="name" /> <include field="name" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="historic-aircraft" group="historic"> <type id="historic-aircraft" group="historic">
<include field="name" /> <include field="name" />
@@ -696,7 +699,7 @@
<!-- Not addable as mapping as a node is uncommon, also ambiguous with amenity-grave_yard --> <!-- Not addable as mapping as a node is uncommon, also ambiguous with amenity-grave_yard -->
<type id="landuse-cemetery" can_add="no"> <type id="landuse-cemetery" can_add="no">
<include group="poi" /> <include group="poi" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<!-- Not addable as mapping as a node is uncommon --> <!-- Not addable as mapping as a node is uncommon -->
<type id="leisure-garden" can_add="no"> <type id="leisure-garden" can_add="no">
@@ -705,6 +708,9 @@
<type id="leisure-resort"> <type id="leisure-resort">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="leisure-sports_centre-sport-swimming">
<include group="poi_internet" />
</type>
<type id="leisure-sports_centre"> <type id="leisure-sports_centre">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
@@ -714,7 +720,7 @@
<!-- Not addable as mapping as a node is uncommon --> <!-- Not addable as mapping as a node is uncommon -->
<type id="leisure-stadium" can_add="no"> <type id="leisure-stadium" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<!-- Not addable as mapping as a node is uncommon --> <!-- Not addable as mapping as a node is uncommon -->
<type id="leisure-swimming_pool" can_add="no"> <type id="leisure-swimming_pool" can_add="no">
@@ -723,7 +729,7 @@
</type> </type>
<type id="natural-cave_entrance" group="historic"> <type id="natural-cave_entrance" group="historic">
<include field="name" /> <include field="name" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="natural-geyser"> <type id="natural-geyser">
<include field="name" /> <include field="name" />
@@ -733,8 +739,8 @@
</type> </type>
<type id="natural-peak"> <type id="natural-peak">
<include field="name" /> <include field="name" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
<!-- <include field="ele" />--> <!-- <include field="ele" /> -->
</type> </type>
<type id="natural-spring"> <type id="natural-spring">
<include field="name" /> <include field="name" />
@@ -742,10 +748,9 @@
<type id="waterway-waterfall"> <type id="waterway-waterfall">
<include field="name" /> <include field="name" />
<include field="height" /> <include field="height" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<!-- Too generic to be added --> <type id="office" group="office">
<type id="office" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="office-company" group="office"> <type id="office-company" group="office">
@@ -775,7 +780,7 @@
<!-- Not addable because ambiguous with landuse=farmyard --> <!-- Not addable because ambiguous with landuse=farmyard -->
<type id="place-farm" can_add="no"> <type id="place-farm" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<!-- Do not allow to edit settlements. <!-- Do not allow to edit settlements.
@@ -842,6 +847,12 @@
<type id="shop-bathroom_furnishing" group="shop"> <type id="shop-bathroom_furnishing" group="shop">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="shop-beauty-nails">
<include group="poi_internet" />
</type>
<type id="shop-beauty-day_spa">
<include group="poi_internet" />
</type>
<type id="shop-beauty"> <type id="shop-beauty">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
@@ -1102,7 +1113,7 @@
</type> </type>
<type id="tourism-alpine_hut" group="accomodation"> <type id="tourism-alpine_hut" group="accomodation">
<include group="poi_internet" /> <include group="poi_internet" />
<!-- <include field="ele" />--> <!-- <include field="ele" /> -->
<include field="opening_hours" /> <include field="opening_hours" />
<include field="website" /> <include field="website" />
</type> </type>
@@ -1112,12 +1123,22 @@
<type id="tourism-aquarium"> <type id="tourism-aquarium">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="tourism-artwork-sculpture">
<include field="name" />
</type>
<type id="tourism-artwork-statue">
<include field="name" />
</type>
<type id="tourism-artwork-painting">
<include field="name" />
</type>
<type id="tourism-artwork"> <type id="tourism-artwork">
<include field="name" /> <include field="name" />
</type> </type>
<!-- Not addable because OSM category is too broad and due to vandalism problems -->
<type id="tourism-attraction" can_add="no"> <type id="tourism-attraction" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
<!-- <include field="wikipedia" />--> <!-- <include field="wikipedia" /> -->
</type> </type>
<type id="attraction-animal"> <type id="attraction-animal">
<include field="name" /> <include field="name" />
@@ -1144,26 +1165,22 @@
<include group="poi_internet" /> <include group="poi_internet" />
<include field="self_service" /> <include field="self_service" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="tourism-information-office">
<type id="tourism-information-office" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="tourism-information-visitor_centre">
<type id="tourism-information-visitor_centre" can_add="no">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="tourism-information-board">
<type id="tourism-information-board" can_add="no">
<include field="name" /> <include field="name" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="tourism-information-map">
<type id="tourism-information-map" can_add="no">
<include field="name" /> <include field="name" />
</type> </type>
<!-- Can not be added because it is a complex type --> <type id="tourism-information-guidepost">
<type id="tourism-information-guidepost" can_add="no">
</type> </type>
<type id="tourism-information"> <!-- Too generic to add -->
<type id="tourism-information" can_add="no">
<include group="poi" /> <include group="poi" />
</type> </type>
<type id="amenity-ranger_station"> <type id="amenity-ranger_station">
@@ -1185,6 +1202,12 @@
<type id="amenity-compressed_air" /> <type id="amenity-compressed_air" />
<type id="amenity-bbq" /> <type id="amenity-bbq" />
<type id="leisure-slipway" /> <type id="leisure-slipway" />
<type id="amenity-shelter-basic_hut">
<include field="name" />
</type>
<type id="amenity-shelter-lean_to">
<include field="name" />
</type>
<type id="amenity-shelter"> <type id="amenity-shelter">
<include field="name" /> <include field="name" />
</type> </type>
@@ -1382,6 +1405,9 @@
<type id="leisure-indoor_play"> <type id="leisure-indoor_play">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<type id="leisure-fitness_centre-sport-yoga">
<include group="poi_internet" />
</type>
<type id="leisure-fitness_centre"> <type id="leisure-fitness_centre">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
@@ -1406,7 +1432,7 @@
<type id="man_made-petroleum_well"> <type id="man_made-petroleum_well">
<include field="name" /> <include field="name" />
<include field="operator" /> <include field="operator" />
<!-- <include field="ele" />--> <!-- <include field="ele" /> -->
</type> </type>
<type id="man_made-water_well"> <type id="man_made-water_well">
<include field="name" /> <include field="name" />
@@ -1433,10 +1459,14 @@
<type id="man_made-lighthouse"> <type id="man_made-lighthouse">
<include field="name" /> <include field="name" />
</type> </type>
<type id="man_made-mast-communication" />
<type id="man_made-mast" /> <type id="man_made-mast" />
<type id="man_made-survey_point"> <type id="man_made-survey_point">
<include field="name" /> <include field="name" />
</type> </type>
<type id="power-generator-wind">
<include field="operator" />
</type>
<type id="man_made-windmill"> <type id="man_made-windmill">
<include field="name" /> <include field="name" />
</type> </type>
@@ -1509,67 +1539,50 @@
<type id="leisure-escape_game"> <type id="leisure-escape_game">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>
<!-- Uncomment this after our editor core supports complex types <type id="amenity-vending_machine-parking_tickets">
<include field="operator" />
<include field="level" />
</type>
<type id="amenity-vending_machine-public_transport_tickets">
<include field="operator" />
<include field="level" />
</type>
<type id="amenity-vending_machine-cigarettes"> <type id="amenity-vending_machine-cigarettes">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="cigarettes" />
<include field="operator" />
</type>
<type id="amenity-vending_machine-coffee">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="coffee" />
<include field="operator" />
</type>
<type id="amenity-vending_machine-condoms">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="condoms" />
<include field="operator" /> <include field="operator" />
<include field="level" />
</type> </type>
<type id="amenity-vending_machine-drinks"> <type id="amenity-vending_machine-drinks">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="drinks" />
<include field="operator" /> <include field="operator" />
<include field="level" />
</type>
<type id="amenity-vending_machine-excrement_bags">
<include field="operator" />
<include field="level" />
</type>
<type id="amenity-vending_machine-coffee">
<include field="operator" />
<include field="level" />
</type>
<type id="amenity-vending_machine-condoms">
<include field="operator" />
<include field="level" />
</type> </type>
<type id="amenity-vending_machine-food"> <type id="amenity-vending_machine-food">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="food" />
<include field="operator" /> <include field="operator" />
<include field="level" />
</type> </type>
<type id="amenity-vending_machine-newspapers"> <type id="amenity-vending_machine-newspapers">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="newspapers" />
<include field="operator" /> <include field="operator" />
<include field="level" />
</type> </type>
<type id="amenity-vending_machine-sweets"> <type id="amenity-vending_machine-sweets">
<tag k="amenity" v="vending_machine" />
<tag k="vending" v="sweets" />
<include field="operator" /> <include field="operator" />
<include field="level" />
</type> </type>
<type id="shop-car_repair-tyres"> <type id="amenity-vending_machine">
<tag k="shop" v="car_repair" /> <include field="operator" />
<tag k="service" v="tyres" /> <include field="level" />
<include group="poi_internet" />
</type> </type>
<type id="leisure-sports_centre-climbing">
<tag k="leisure" v="sports_centre" />
<tag k="sport" v="climbing" />
<include group="poi_internet" />
</type>
<type id="leisure-sports_centre-shooting">
<tag k="leisure" v="sports_centre" />
<tag k="sport" v="shooting" />
<include group="poi_internet" />
</type>
<type id="leisure-sports_centre-swimming">
<tag k="leisure" v="sports_centre" />
<tag k="sport" v="swimming" />
<include group="poi_internet" />
</type>
<type id="leisure-sports_centre-yoga">
<tag k="leisure" v="sports_centre" />
<tag k="sport" v="yoga" />
<include group="poi_internet" />
</type-->
<!-- Not addable as mapping as a node is uncommon --> <!-- Not addable as mapping as a node is uncommon -->
<type id="natural-beach" can_add="no"> <type id="natural-beach" can_add="no">
<include field="name" /> <include field="name" />
@@ -1581,9 +1594,6 @@
<type id="building-address" can_add="yes"> <type id="building-address" can_add="yes">
<include group="address" /> <include group="address" />
</type> </type>
<!-- Uncomment this after a map style is added
<type id="man_made-surveillance">
</type-->
<type id="tourism-theme_park"> <type id="tourism-theme_park">
<include group="poi_internet" /> <include group="poi_internet" />
</type> </type>

View File

@@ -5,7 +5,7 @@
# highway|bus_stop;[highway=bus_stop];;name;int_name;22; # highway|bus_stop;[highway=bus_stop];;name;int_name;22;
# It contains: # It contains:
# - type name: "highway|bus_stop" ("|" is converted to "-" internally) # - type name: "highway|bus_stop" ("|" is converted to "-" internally)
# - mapcss selectors for tags: "[highway=bus_stop]", multiple selectors are separated with commas # - mapcss selectors for tags: "[highway=bus_stop]", multiple selectors are separated with commas, best practice tagging for OSM editor is listed first
# - "x" for a deprecated type or an empty cell otherwise # - "x" for a deprecated type or an empty cell otherwise
# - primary title tag (usually "name") # - primary title tag (usually "name")
# - secondary title tag (usually "int_name") # - secondary title tag (usually "int_name")
@@ -101,7 +101,7 @@ natural|wetland;33;
deprecated:highway|track|grade3:04.4024;[highway=track][tracktype=grade3];x;name;int_name;34;highway|track deprecated:highway|track|grade3:04.4024;[highway=track][tracktype=grade3];x;name;int_name;34;highway|track
# ~1M usages. # ~1M usages.
power|minor_line;[power=minor_line][!location];;;;35; power|minor_line;[power=minor_line][!location];;;;35;
amenity|school;[amenity=school],[education=school];;name;int_name;36; amenity|school;[amenity=school][education=school],[amenity=school],[education=school];;name;int_name;36;
# Dedicated/segregated cycleways (e.g. segregated paths are converted into cycleways + footways, see osm2type.cpp). # Dedicated/segregated cycleways (e.g. segregated paths are converted into cycleways + footways, see osm2type.cpp).
highway|cycleway;37; highway|cycleway;37;
# ~16M usages. # ~16M usages.
@@ -202,7 +202,7 @@ landuse|commercial;111;
moved:railway|station:05.2024;112;railway|station moved:railway|station:05.2024;112;railway|station
deprecated:highway|path|hiking:04.2024;[highway=path][route=hiking],[highway=path][sac_scale=hiking];x;name;int_name;113;highway|path deprecated:highway|path|hiking:04.2024;[highway=path][route=hiking],[highway=path][sac_scale=hiking];x;name;int_name;113;highway|path
# ~200k usages. # ~200k usages.
amenity|hospital;114; amenity|hospital;[amenity=hospital][healthcare=hospital],[amenity=hospital],[healthcare=hospital];;name;int_name;114;
# TODO: merge with "intermittent". # TODO: merge with "intermittent".
waterway|stream|ephemeral;[waterway=stream][intermittent=ephemeral];;name;int_name;115; waterway|stream|ephemeral;[waterway=stream][intermittent=ephemeral];;name;int_name;115;
highway|trunk|bridge;[highway=trunk][bridge?];;name;int_name;116; highway|trunk|bridge;[highway=trunk][bridge?];;name;int_name;116;
@@ -210,7 +210,7 @@ highway|trunk|bridge;[highway=trunk][bridge?];;name;int_name;116;
amenity|post_office;117; amenity|post_office;117;
# ~230k usages. # ~230k usages.
landuse|quarry;118; landuse|quarry;118;
amenity|pharmacy;119; amenity|pharmacy;[amenity=pharmacy][healthcare=pharmacy],[amenity=pharmacy],[healthcare=pharmacy];;name;int_name;119;
man_made|pier;120; man_made|pier;120;
# ~220k usages. # ~220k usages.
highway|motorway_junction;121; highway|motorway_junction;121;
@@ -276,7 +276,7 @@ deprecated:natural|wood|coniferous:01.2020;[natural=wood][wood=coniferous],[natu
landuse|recreation_ground;173; landuse|recreation_ground;173;
landuse|village_green;174; landuse|village_green;174;
amenity|drinking_water;175; amenity|drinking_water;175;
amenity|university;[amenity=university],[education=university];;name;int_name;176; amenity|university;[amenity=university][education=university],[amenity=university],[education=university];;name;int_name;176;
highway|secondary_link;177; highway|secondary_link;177;
power|substation;178; power|substation;178;
railway|tram_stop;179; railway|tram_stop;179;
@@ -309,7 +309,7 @@ power|portal;204;
# Marsh 500K usages, wet_meadow 160K # Marsh 500K usages, wet_meadow 160K
natural|wetland|marsh;[natural=wetland][wetland=marsh],[natural=wetland][wetland=wet_meadow],[natural=wetland][wetland=dambo];;;;205; natural|wetland|marsh;[natural=wetland][wetland=marsh],[natural=wetland][wetland=wet_meadow],[natural=wetland][wetland=dambo];;;;205;
leisure|stadium;206; leisure|stadium;206;
amenity|doctors;207; amenity|doctors;[amenity=doctors][healthcare=doctor],[amenity=doctors],[healthcare=doctor];;name;int_name;207;
railway|disused;208; railway|disused;208;
aeroway|runway;209; aeroway|runway;209;
railway|halt;210; railway|halt;210;
@@ -327,7 +327,7 @@ sport|swimming;220;
leisure|track;221; leisure|track;221;
sport|skateboard;222; sport|skateboard;222;
barrier|retaining_wall;223; barrier|retaining_wall;223;
amenity|college;[amenity=college],[education=college];;name;int_name;224; amenity|college;[amenity=college][education=college],[amenity=college],[education=college];;name;int_name;224;
sport|baseball;225; sport|baseball;225;
highway|service|area;[highway=service][area?];;name;int_name;226; highway|service|area;[highway=service][area?];;name;int_name;226;
highway|residential|area;[highway=residential][area?];;name;int_name;227; highway|residential|area;[highway=residential][area?];;name;int_name;227;
@@ -625,9 +625,9 @@ toilets|yes;502;
highway|trunk_link|tunnel;[highway=trunk_link][tunnel?];;name;int_name;503; highway|trunk_link|tunnel;[highway=trunk_link][tunnel?];;name;int_name;503;
drinking_water|yes;[drinking_water=yes],[drinking_water=treated],[drinking_water:refill=yes];;;;504; drinking_water|yes;[drinking_water=yes],[drinking_water=treated],[drinking_water:refill=yes];;;;504;
drinking_water|no;505; drinking_water|no;505;
amenity|sailing_school;[amenity=sailing_school],[education=sailing_school];;name;int_name;506; amenity|sailing_school;[amenity=sailing_school][education=sailing_school],[amenity=sailing_school],[education=sailing_school];;name;int_name;506;
amenity|flight_school;[amenity=sailing_school],[education=flight_school];;name;int_name;507; amenity|flight_school;[amenity=flight_school][education=flight_school],[amenity=flight_school],[education=flight_school];;name;int_name;507;
amenity|prep_school;[amenity=prep_school],[education=prep_school];;name;int_name;508; amenity|prep_school;[amenity=prep_school][education=prep_school],[amenity=prep_school],[education=prep_school];;name;int_name;508;
amenity|car_pooling;509; amenity|car_pooling;509;
social_facility|soup_kitchen;510; social_facility|soup_kitchen;510;
social_facility|food_bank;511; social_facility|food_bank;511;
@@ -1160,8 +1160,8 @@ railway|subway_entrance|madrid;[railway=subway_entrance][city=madrid];;name;int_
railway|subway_entrance|roma;[railway=subway_entrance][city=roma];;name;int_name;1033; railway|subway_entrance|roma;[railway=subway_entrance][city=roma];;name;int_name;1033;
railway|subway_entrance|spb;[railway=subway_entrance][city=spb];;name;int_name;1034; railway|subway_entrance|spb;[railway=subway_entrance][city=spb];;name;int_name;1034;
aerialway|drag_lift;1035; aerialway|drag_lift;1035;
amenity|dentist;1036; amenity|dentist;[amenity=dentist][healthcare=dentist],[amenity=dentist],[healthcare=dentist];;name;int_name;1036;
amenity|clinic;1037; amenity|clinic;[amenity=clinic][healthcare=clinic],[amenity=clinic],[healthcare=clinic];;name;int_name;1037;
barrier|entrance;1038; barrier|entrance;1038;
barrier|border_control;1039; barrier|border_control;1039;
shop|laundry;1040; shop|laundry;1040;
@@ -1257,8 +1257,8 @@ amenity|vending_machine|food;[amenity=vending_machine][vending=food];;name;int_n
amenity|vending_machine|newspapers;[amenity=vending_machine][vending=newspapers];;name;int_name;1130; amenity|vending_machine|newspapers;[amenity=vending_machine][vending=newspapers];;name;int_name;1130;
amenity|vending_machine|sweets;[amenity=vending_machine][vending=sweets];;name;int_name;1131; amenity|vending_machine|sweets;[amenity=vending_machine][vending=sweets];;name;int_name;1131;
leisure|dance;[leisure=dance],[amenity=dancing_school];;;;1132; leisure|dance;[leisure=dance],[amenity=dancing_school];;;;1132;
amenity|music_school;[amenity=music_school],[education=music_school];;name;int_name;1133; amenity|music_school;[amenity=music_school][education=music_school],[amenity=music_school],[education=music_school];;name;int_name;1133;
amenity|language_school;[amenity=language_school],[education=language_school];;name;int_name;1134; amenity|language_school;[amenity=language_school][education=language_school],[amenity=language_school],[education=language_school];;name;int_name;1134;
historic|city_gate;1135; historic|city_gate;1135;
sport|padel;1136; sport|padel;1136;
sport|futsal;1137; sport|futsal;1137;
@@ -1285,7 +1285,7 @@ shop|charity;1157;
hwtag|toll;1158; hwtag|toll;1158;
amenity|arts_centre;1159; amenity|arts_centre;1159;
amenity|biergarten;1160; amenity|biergarten;1160;
amenity|driving_school;[amenity=driving_school],[education=driving_school];;name;int_name;1161; amenity|driving_school;[amenity=driving_school][education=driving_school],[amenity=driving_school],[education=driving_school];;name;int_name;1161;
amenity|food_court;1162; amenity|food_court;1162;
amenity|ice_cream;1163; amenity|ice_cream;1163;
amenity|internet_cafe;1164; amenity|internet_cafe;1164;
Can't render this file because it contains an unexpected character in line 7 and column 16.

View File

@@ -680,7 +680,7 @@
"editor_edits_sent_message" = "Din note vil blive sendt til OpenStreetMap"; "editor_edits_sent_message" = "Din note vil blive sendt til OpenStreetMap";
"editor_comment_hint" = "Kommentar…"; "editor_comment_hint" = "Kommentar…";
"editor_reset_edits_message" = "Kassér alle lokale ændringer?"; "editor_reset_edits_message" = "Kassér alle lokale ændringer?";
"editor_reset_edits_button" = "Kassér"; "editor_reset_edits_button" = "Kassér ændringer";
"editor_remove_place_message" = "Slet tilføjet sted?"; "editor_remove_place_message" = "Slet tilføjet sted?";
"editor_remove_place_button" = "Slet"; "editor_remove_place_button" = "Slet";
"editor_place_doesnt_exist" = "Stedet eksisterer ikke"; "editor_place_doesnt_exist" = "Stedet eksisterer ikke";

View File

@@ -189,7 +189,7 @@
"type.amenity.shelter.basic_hut" = "Bivouac Hut"; "type.amenity.shelter.basic_hut" = "Bivouac Hut";
/* A traditional 3-walled shelter (one side open), suitable for overnight camping. */ /* A traditional 3-walled shelter (one side open), suitable for overnight camping. */
"type.amenity.shelter.lean_to" = "Lean-to Shelter"; "type.amenity.shelter.lean_to" = "Lean-to Sleep Shelter";
"type.amenity.public_bath" = "Public Bath"; "type.amenity.public_bath" = "Public Bath";
"type.amenity.shower" = "Shower"; "type.amenity.shower" = "Shower";
"type.amenity.stripclub" = "Stripclub"; "type.amenity.stripclub" = "Stripclub";
@@ -208,7 +208,7 @@
"type.amenity.vending_machine.food" = "Food Dispenser"; "type.amenity.vending_machine.food" = "Food Dispenser";
"type.amenity.vending_machine.newspapers" = "Newspaper Dispenser"; "type.amenity.vending_machine.newspapers" = "Newspaper Dispenser";
"type.amenity.vending_machine.parking_tickets" = "Parking Meter"; "type.amenity.vending_machine.parking_tickets" = "Parking Meter";
"type.amenity.vending_machine.public_transport_tickets" = "Ticket Machine"; "type.amenity.vending_machine.public_transport_tickets" = "Public Transport Ticket Machine";
"type.amenity.vending_machine.sweets" = "Sweets Dispenser"; "type.amenity.vending_machine.sweets" = "Sweets Dispenser";
"type.amenity.vending_machine.excrement_bags" = "Excrement Bags Dispenser"; "type.amenity.vending_machine.excrement_bags" = "Excrement Bags Dispenser";
"type.amenity.parcel_locker" = "Parcel Locker"; "type.amenity.parcel_locker" = "Parcel Locker";

View File

@@ -1220,7 +1220,7 @@
"type.shop.doityourself" = "Tienda de bricolaje"; "type.shop.doityourself" = "Tienda de bricolaje";
"type.shop.dry_cleaning" = "Tintorería"; "type.shop.dry_cleaning" = "Tintorería";
"type.shop.electronics" = "Electrónica"; "type.shop.electronics" = "Electrónica";
"type.shop.erotic" = "Sex Shop"; "type.shop.erotic" = "Tienda erótica";
"type.shop.fabric" = "Tienda de telas"; "type.shop.fabric" = "Tienda de telas";
"type.shop.farm" = "Tienda de alimentos de granja"; "type.shop.farm" = "Tienda de alimentos de granja";
"type.shop.fashion_accessories" = "Accesorios de moda"; "type.shop.fashion_accessories" = "Accesorios de moda";

View File

@@ -681,7 +681,7 @@
"editor_edits_sent_message" = "Sinu märkus saadetakse OpenStreetMapile"; "editor_edits_sent_message" = "Sinu märkus saadetakse OpenStreetMapile";
"editor_comment_hint" = "Kommenteeri…"; "editor_comment_hint" = "Kommenteeri…";
"editor_reset_edits_message" = "Kas loobud kõigist kohalikest muudatustest?"; "editor_reset_edits_message" = "Kas loobud kõigist kohalikest muudatustest?";
"editor_reset_edits_button" = "Loobu"; "editor_reset_edits_button" = "Loobu muudatustest";
"editor_remove_place_message" = "Kas kustutad lisatud koha?"; "editor_remove_place_message" = "Kas kustutad lisatud koha?";
"editor_remove_place_button" = "Kustuta"; "editor_remove_place_button" = "Kustuta";
"editor_place_doesnt_exist" = "Kohta pole olemas"; "editor_place_doesnt_exist" = "Kohta pole olemas";

View File

@@ -456,3 +456,11 @@
"type.entrance.exit" = "Izhod (samo)"; "type.entrance.exit" = "Izhod (samo)";
"type.healthcare.laboratory" = "Zdravstveni laboratorij"; "type.healthcare.laboratory" = "Zdravstveni laboratorij";
"type.healthcare.psychotherapist" = "Psihoterapevt"; "type.healthcare.psychotherapist" = "Psihoterapevt";
"type.highway.cycleway.tunnel" = "Predor";
"type.highway.elevator" = "Dvigalo";
"type.highway.footway" = "Pešpot";
"type.highway.footway.sidewalk" = "Pločnik";
"type.highway.footway.crossing" = "Prehod za pešce";
"type.highway.footway.area" = "Površina za pešce";
"type.highway.footway.bridge" = "Most za pešce";
"type.highway.footway.tunnel" = "Predor za pešce";

View File

@@ -683,7 +683,7 @@
"editor_edits_sent_message" = "您的说明将发送至 OpenStreetMap"; "editor_edits_sent_message" = "您的说明将发送至 OpenStreetMap";
"editor_comment_hint" = "备注…"; "editor_comment_hint" = "备注…";
"editor_reset_edits_message" = "舍弃所有本地更改?"; "editor_reset_edits_message" = "舍弃所有本地更改?";
"editor_reset_edits_button" = "舍弃"; "editor_reset_edits_button" = "舍弃更改";
"editor_remove_place_message" = "删除已添加的地点?"; "editor_remove_place_message" = "删除已添加的地点?";
"editor_remove_place_button" = "删除"; "editor_remove_place_button" = "删除";
"editor_place_doesnt_exist" = "该地点不存在"; "editor_place_doesnt_exist" = "该地点不存在";

View File

@@ -40,6 +40,7 @@
27AF18562E1DB63000CD41E2 /* PowerSavingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */; }; 27AF18562E1DB63000CD41E2 /* PowerSavingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */; };
27AF18582E1DB63A00CD41E2 /* Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18572E1DB63900CD41E2 /* Appearance.swift */; }; 27AF18582E1DB63A00CD41E2 /* Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18572E1DB63900CD41E2 /* Appearance.swift */; };
27AF185A2E1DB64500CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */; }; 27AF185A2E1DB64500CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */; };
27FDBF212EEEFC830045621D /* mapcss-mapping.csv in Resources */ = {isa = PBXBuildFile; fileRef = 27FDBF202EEEFC830045621D /* mapcss-mapping.csv */; };
3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3304306C21D4EAFB00317CA3 /* SearchCategoryCell.swift */; }; 3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3304306C21D4EAFB00317CA3 /* SearchCategoryCell.swift */; };
33046832219C57180041F3A8 /* CategorySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33046831219C57180041F3A8 /* CategorySettingsViewController.swift */; }; 33046832219C57180041F3A8 /* CategorySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33046831219C57180041F3A8 /* CategorySettingsViewController.swift */; };
337F98A621D37B7400C8AC27 /* SearchTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F98A521D37B7400C8AC27 /* SearchTabViewController.swift */; }; 337F98A621D37B7400C8AC27 /* SearchTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337F98A521D37B7400C8AC27 /* SearchTabViewController.swift */; };
@@ -789,6 +790,7 @@
27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowerSavingMode.swift; sourceTree = "<group>"; }; 27AF18552E1DB62F00CD41E2 /* PowerSavingMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowerSavingMode.swift; sourceTree = "<group>"; };
27AF18572E1DB63900CD41E2 /* Appearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = "<group>"; }; 27AF18572E1DB63900CD41E2 /* Appearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = "<group>"; };
27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnnouncingSpeedTrapsWhileVoiceRouting.swift; sourceTree = "<group>"; }; 27AF18592E1DB64400CD41E2 /* AnnouncingSpeedTrapsWhileVoiceRouting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnnouncingSpeedTrapsWhileVoiceRouting.swift; sourceTree = "<group>"; };
27FDBF202EEEFC830045621D /* mapcss-mapping.csv */ = {isa = PBXFileReference; lastKnownFileType = text; name = "mapcss-mapping.csv"; path = "/Users/yannikbloscheck/Apps/CoMaps/Code/data/mapcss-mapping.csv"; sourceTree = "<absolute>"; };
28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Maps_Prefix.pch; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Maps_Prefix.pch; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 2; path = main.mm; sourceTree = "<group>"; tabWidth = 2; }; 29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; indentWidth = 2; path = main.mm; sourceTree = "<group>"; tabWidth = 2; };
30034C5C2B3F0B74005D961A /* az */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = az; path = az.lproj/Localizable.strings; sourceTree = "<group>"; }; 30034C5C2B3F0B74005D961A /* az */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = az; path = az.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -3948,6 +3950,7 @@
6B9978341C89A316003B8AA0 /* editor.config */, 6B9978341C89A316003B8AA0 /* editor.config */,
978D4A30199A11E600D72CA7 /* faq.html */, 978D4A30199A11E600D72CA7 /* faq.html */,
BB7626B41E8559980031D71C /* icudt75l.dat */, BB7626B41E8559980031D71C /* icudt75l.dat */,
27FDBF202EEEFC830045621D /* mapcss-mapping.csv */,
F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */, F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */,
FA85F632145DDDC20090E1A0 /* packed_polygons.bin */, FA85F632145DDDC20090E1A0 /* packed_polygons.bin */,
451950391B7A3E070085DA05 /* patterns.txt */, 451950391B7A3E070085DA05 /* patterns.txt */,
@@ -4201,6 +4204,7 @@
34F73F9F1E082FF800AC1FD6 /* Localizable.strings in Resources */, 34F73F9F1E082FF800AC1FD6 /* Localizable.strings in Resources */,
340E1EF21E2F614400CE49BF /* Main.storyboard in Resources */, 340E1EF21E2F614400CE49BF /* Main.storyboard in Resources */,
F6E2FE521E097BA00083EBEC /* MWMActionBarButton.xib in Resources */, F6E2FE521E097BA00083EBEC /* MWMActionBarButton.xib in Resources */,
27FDBF212EEEFC830045621D /* mapcss-mapping.csv in Resources */,
EDBD68072B625724005DD151 /* LocationServicesDisabledAlert.xib in Resources */, EDBD68072B625724005DD151 /* LocationServicesDisabledAlert.xib in Resources */,
993DF0CA23F6BD0600AC231A /* ElevationDetailsViewController.xib in Resources */, 993DF0CA23F6BD0600AC231A /* ElevationDetailsViewController.xib in Resources */,
F623DA6F1C9C2E62006A3436 /* MWMAddPlaceNavigationBar.xib in Resources */, F623DA6F1C9C2E62006A3436 /* MWMAddPlaceNavigationBar.xib in Resources */,

View File

@@ -158,7 +158,7 @@ void registerCellsForTableView(std::vector<MWMEditorCellID> const & cells, UITab
[self configNavBar]; [self configNavBar];
auto const & fid = m_mapObject.GetID(); auto const & fid = m_mapObject.GetID();
self.featureStatus = osm::Editor::Instance().GetFeatureStatus(fid.m_mwmId, fid.m_index); self.featureStatus = osm::Editor::Instance().GetFeatureStatus(fid.m_mwmId, fid.m_index);
self.isFeatureUploaded = osm::Editor::Instance().IsFeatureUploaded(fid.m_mwmId, fid.m_index); self.isFeatureUploaded = osm::Editor::Instance().AreSomeFeatureChangesUploaded(fid.m_mwmId, fid.m_index);
m_newAdditionalLanguages.clear(); m_newAdditionalLanguages.clear();
if (self.isCreating) if (self.isCreating)
{ {
@@ -1089,7 +1089,7 @@ void registerCellsForTableView(std::vector<MWMEditorCellID> const & cells, UITab
- (void)tapOnButtonCell:(UITableViewCell *)cell - (void)tapOnButtonCell:(UITableViewCell *)cell
{ {
auto const & fid = m_mapObject.GetID(); auto const & fid = m_mapObject.GetID();
self.isFeatureUploaded = osm::Editor::Instance().IsFeatureUploaded(fid.m_mwmId, fid.m_index); self.isFeatureUploaded = osm::Editor::Instance().AreSomeFeatureChangesUploaded(fid.m_mwmId, fid.m_index);
NSIndexPath * ip = [self.tableView indexPathForCell:cell]; NSIndexPath * ip = [self.tableView indexPathForCell:cell];
[self.tableView reloadRowsAtIndexPaths:@[ ip ] withRowAnimation:UITableViewRowAnimationFade]; [self.tableView reloadRowsAtIndexPaths:@[ ip ] withRowAnimation:UITableViewRowAnimationFade];

View File

@@ -260,14 +260,6 @@ WeekDayView getWeekDayView()
}); });
} }
- (IBAction)extendedToggleButtonTap
{
id<MWMPlacePageOpeningHoursCellProtocol> delegate = self.delegate;
if (delegate.isEditor) {
[delegate setOpeningHoursCellExpanded:!delegate.openingHoursCellExpanded];
}
}
#pragma mark - Properties #pragma mark - Properties
- (BOOL)isExpanded - (BOOL)isExpanded

View File

@@ -172,30 +172,17 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fNU-1q-AiR"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fNU-1q-AiR">
<rect key="frame" x="0.0" y="127" width="320" height="122"/> <rect key="frame" x="0.0" y="127" width="320" height="122"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="122" id="Ifb-EB-LIb"/> <constraint firstAttribute="height" constant="122" id="Ifb-EB-LIb"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hYN-dO-J0e" userLabel="Editor Button">
<rect key="frame" x="0.0" y="0.0" width="320" height="249"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain"/>
<connections>
<action selector="extendedToggleButtonTap" destination="KGk-i7-Jjw" eventType="touchUpInside" id="BSf-KC-HgD"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="fNU-1q-AiR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="08I-np-9jr"/> <constraint firstItem="fNU-1q-AiR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="08I-np-9jr"/>
<constraint firstAttribute="trailing" secondItem="hYN-dO-J0e" secondAttribute="trailing" id="0Vo-1D-dPq"/>
<constraint firstAttribute="trailing" secondItem="fNU-1q-AiR" secondAttribute="trailing" id="2Hz-cA-KuN"/> <constraint firstAttribute="trailing" secondItem="fNU-1q-AiR" secondAttribute="trailing" id="2Hz-cA-KuN"/>
<constraint firstItem="hYN-dO-J0e" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="GVQ-l4-vnQ"/>
<constraint firstItem="0kQ-hh-2Cy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="60" id="KwF-TF-PmH"/> <constraint firstItem="0kQ-hh-2Cy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="60" id="KwF-TF-PmH"/>
<constraint firstAttribute="trailing" secondItem="0kQ-hh-2Cy" secondAttribute="trailing" constant="32" id="RqH-0b-AyG"/> <constraint firstAttribute="trailing" secondItem="0kQ-hh-2Cy" secondAttribute="trailing" constant="32" id="RqH-0b-AyG"/>
<constraint firstItem="hYN-dO-J0e" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Sav-rp-wo2"/>
<constraint firstItem="swk-um-XzG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="VsQ-qI-dIi"/> <constraint firstItem="swk-um-XzG" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="VsQ-qI-dIi"/>
<constraint firstAttribute="bottom" secondItem="hYN-dO-J0e" secondAttribute="bottom" id="Xe1-4J-wRh"/>
<constraint firstItem="0kQ-hh-2Cy" firstAttribute="top" secondItem="swk-um-XzG" secondAttribute="bottom" id="Xrh-Vg-VYg"/> <constraint firstItem="0kQ-hh-2Cy" firstAttribute="top" secondItem="swk-um-XzG" secondAttribute="bottom" id="Xrh-Vg-VYg"/>
<constraint firstItem="swk-um-XzG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="p14-Mi-kcR"/> <constraint firstItem="swk-um-XzG" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="p14-Mi-kcR"/>
<constraint firstItem="fNU-1q-AiR" firstAttribute="top" secondItem="0kQ-hh-2Cy" secondAttribute="bottom" id="uKD-bb-yHT"/> <constraint firstItem="fNU-1q-AiR" firstAttribute="top" secondItem="0kQ-hh-2Cy" secondAttribute="bottom" id="uKD-bb-yHT"/>
@@ -205,7 +192,6 @@
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/> <userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</tableViewCellContentView> </tableViewCellContentView>
<gestureRecognizers/>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/> <inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections> <connections>
<outlet property="currentDay" destination="swk-um-XzG" id="CJG-LQ-Pu8"/> <outlet property="currentDay" destination="swk-um-XzG" id="CJG-LQ-Pu8"/>

View File

@@ -231,14 +231,6 @@ void SymbolsTexture::Invalidate(ref_ptr<dp::GraphicsContext> context, std::strin
Load(context, skinPathName, allocator); Load(context, skinPathName, allocator);
} }
void SymbolsTexture::Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
ref_ptr<HWTextureAllocator> allocator,
std::vector<drape_ptr<HWTexture>> & internalTextures)
{
internalTextures.push_back(std::move(m_hwTexture));
Invalidate(context, skinPathName, allocator);
}
ref_ptr<Texture::ResourceInfo> SymbolsTexture::FindResource(Texture::Key const & key, bool & newResource) ref_ptr<Texture::ResourceInfo> SymbolsTexture::FindResource(Texture::Key const & key, bool & newResource)
{ {
newResource = false; newResource = false;

View File

@@ -36,8 +36,6 @@ public:
void Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName, void Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
ref_ptr<HWTextureAllocator> allocator); ref_ptr<HWTextureAllocator> allocator);
void Invalidate(ref_ptr<dp::GraphicsContext> context, std::string const & skinPathName,
ref_ptr<HWTextureAllocator> allocator, std::vector<drape_ptr<HWTexture>> & internalTextures);
bool IsSymbolContained(std::string const & symbolName) const; bool IsSymbolContained(std::string const & symbolName) const;

View File

@@ -73,6 +73,12 @@ public:
static bool IsPowerOfTwo(uint32_t width, uint32_t height); static bool IsPowerOfTwo(uint32_t width, uint32_t height);
void DeferredCleanup(std::vector<drape_ptr<HWTexture>> & toCleanup)
{
toCleanup.push_back(std::move(m_hwTexture));
Destroy();
}
protected: protected:
void Destroy(); void Destroy();
bool AllocateTexture(ref_ptr<dp::GraphicsContext> context, ref_ptr<HWTextureAllocator> allocator); bool AllocateTexture(ref_ptr<dp::GraphicsContext> context, ref_ptr<HWTextureAllocator> allocator);

View File

@@ -87,6 +87,10 @@ drape_ptr<Texture> CreateArrowTexture(ref_ptr<dp::GraphicsContext> context,
useDefaultResourceFolder ? StaticTexture::kDefaultResource : std::string(), useDefaultResourceFolder ? StaticTexture::kDefaultResource : std::string(),
dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */); dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
} }
// There is no "arrow-texture.png".
// BackendRenderer::m_arrow3dPreloadedData mesh is used by default.
/// @todo Texture arrow is still present in case if somebody wants to use it?
return make_unique_dp<StaticTexture>(context, "arrow-texture.png", StaticTexture::kDefaultResource, return make_unique_dp<StaticTexture>(context, "arrow-texture.png", StaticTexture::kDefaultResource,
dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */); dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
} }
@@ -315,39 +319,7 @@ void TextureManager::Init(ref_ptr<dp::GraphicsContext> context, Params const & p
m_smaaSearchTexture = make_unique_dp<StaticTexture>(context, "smaa-search.png", StaticTexture::kDefaultResource, m_smaaSearchTexture = make_unique_dp<StaticTexture>(context, "smaa-search.png", StaticTexture::kDefaultResource,
dp::TextureFormat::Red, make_ref(m_textureAllocator)); dp::TextureFormat::Red, make_ref(m_textureAllocator));
// Initialize patterns (reserved ./data/patterns.txt lines count). InitStipplePen(params);
std::set<PenPatternT> patterns;
double const visualScale = params.m_visualScale;
uint32_t rowsCount = 0;
impl::ParsePatternsList(params.m_patterns, [&](buffer_vector<double, 8> const & pattern)
{
PenPatternT toAdd;
for (double d : pattern)
toAdd.push_back(PatternFloat2Pixel(d * visualScale));
if (!patterns.insert(toAdd).second)
return;
if (IsTrianglePattern(toAdd))
{
rowsCount = rowsCount + toAdd[2] + toAdd[3];
}
else
{
ASSERT_EQUAL(toAdd.size(), 2, ());
++rowsCount;
}
});
m_stipplePenTexture = make_unique_dp<StipplePenTexture>(StipplePenTextureSize(rowsCount, m_maxTextureSize),
make_ref(m_textureAllocator));
LOG(LDEBUG, ("Patterns texture size =", m_stipplePenTexture->GetWidth(), m_stipplePenTexture->GetHeight()));
ref_ptr<StipplePenTexture> stipplePenTex = make_ref(m_stipplePenTexture);
for (auto const & p : patterns)
stipplePenTex->ReservePattern(p);
// Initialize colors (reserved ./data/colors.txt lines count). // Initialize colors (reserved ./data/colors.txt lines count).
std::vector<dp::Color> colors; std::vector<dp::Color> colors;
@@ -380,25 +352,73 @@ void TextureManager::Init(ref_ptr<dp::GraphicsContext> context, Params const & p
m_nothingToUpload.clear(); m_nothingToUpload.clear();
} }
void TextureManager::InitStipplePen(Params const & params)
{
// Initialize patterns (reserved ./data/patterns.txt lines count).
std::set<PenPatternT> patterns;
uint32_t rowsCount = 0;
impl::ParsePatternsList(params.m_patterns, [&](buffer_vector<double, 8> const & pattern)
{
PenPatternT toAdd;
for (double d : pattern)
toAdd.push_back(PatternFloat2Pixel(d * params.m_visualScale));
if (!patterns.insert(toAdd).second)
return;
if (IsTrianglePattern(toAdd))
{
rowsCount = rowsCount + toAdd[2] + toAdd[3];
}
else
{
ASSERT_EQUAL(toAdd.size(), 2, ());
++rowsCount;
}
});
m_stipplePenTexture = make_unique_dp<StipplePenTexture>(StipplePenTextureSize(rowsCount, m_maxTextureSize),
make_ref(m_textureAllocator));
LOG(LDEBUG, ("Patterns texture size =", m_stipplePenTexture->GetWidth(), m_stipplePenTexture->GetHeight()));
ref_ptr<StipplePenTexture> stipplePenTex = make_ref(m_stipplePenTexture);
for (auto const & p : patterns)
stipplePenTex->ReservePattern(p);
}
void TextureManager::OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context) void TextureManager::OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context)
{ {
CHECK(m_isInitialized, ()); CHECK(m_isInitialized, ());
bool const isVulkan = context->GetApiVersion() == dp::ApiVersion::Vulkan;
// Here we need invalidate only textures which can be changed in map style switch. // Here we need invalidate only textures which can be changed in map style switch.
// Now we update only symbol textures, if we need update other textures they must be added here. // Now we update only symbol textures, if we need update other textures they must be added here.
// For Vulkan we use m_texturesToCleanup to defer textures destroying. // For Vulkan we use m_texturesToCleanup to defer textures destroying.
for (auto const & m_symbolTexture : m_symbolTextures) for (auto const & texture : m_symbolTextures)
{ {
ref_ptr<SymbolsTexture> symbolsTexture = make_ref(m_symbolTexture); ref_ptr<SymbolsTexture> symbolsTexture = make_ref(texture);
ASSERT(symbolsTexture != nullptr, ()); if (isVulkan)
symbolsTexture->DeferredCleanup(m_texturesToCleanup);
if (context->GetApiVersion() != dp::ApiVersion::Vulkan)
symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator)); symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator));
else
symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator), m_texturesToCleanup);
} }
} }
void TextureManager::OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params)
{
m_resPostfix = params.m_resPostfix;
OnSwitchMapStyle(context);
if (context->GetApiVersion() == dp::ApiVersion::Vulkan)
m_stipplePenTexture->DeferredCleanup(m_texturesToCleanup);
InitStipplePen(params);
}
void TextureManager::InvalidateArrowTexture(ref_ptr<dp::GraphicsContext> context, void TextureManager::InvalidateArrowTexture(ref_ptr<dp::GraphicsContext> context,
std::string const & texturePath /* = {} */, std::string const & texturePath /* = {} */,
bool useDefaultResourceFolder /* = false */) bool useDefaultResourceFolder /* = false */)
@@ -416,10 +436,13 @@ void TextureManager::ApplyInvalidatedStaticTextures()
} }
} }
void TextureManager::GetTexturesToCleanup(std::vector<drape_ptr<HWTexture>> & textures) std::vector<drape_ptr<HWTexture>> TextureManager::GetTexturesToCleanup()
{ {
CHECK(m_isInitialized, ()); CHECK(m_isInitialized, ());
std::swap(textures, m_texturesToCleanup);
auto res = std::move(m_texturesToCleanup);
m_texturesToCleanup.clear();
return res;
} }
bool TextureManager::GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region) bool TextureManager::GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region)

View File

@@ -77,7 +77,9 @@ public:
void Init(ref_ptr<dp::GraphicsContext> context, Params const & params); void Init(ref_ptr<dp::GraphicsContext> context, Params const & params);
void OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context); void OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context);
void GetTexturesToCleanup(std::vector<drape_ptr<HWTexture>> & textures); void OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params);
std::vector<drape_ptr<HWTexture>> GetTexturesToCleanup();
bool GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region); bool GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region);
void GetSymbolRegion(std::string const & symbolName, SymbolRegion & region); void GetSymbolRegion(std::string const & symbolName, SymbolRegion & region);
@@ -121,6 +123,8 @@ public:
ref_ptr<HWTextureAllocator> GetTextureAllocator() const; ref_ptr<HWTextureAllocator> GetTextureAllocator() const;
private: private:
void InitStipplePen(Params const & params);
struct GlyphGroup struct GlyphGroup
{ {
std::set<GlyphFontAndId> m_glyphKeys; std::set<GlyphFontAndId> m_glyphKeys;

View File

@@ -17,8 +17,6 @@
#include "drape/support_manager.hpp" #include "drape/support_manager.hpp"
#include "drape/texture_manager.hpp" #include "drape/texture_manager.hpp"
#include "indexer/scales.hpp"
#include "platform/platform.hpp" #include "platform/platform.hpp"
#include "base/file_name_utils.hpp" #include "base/file_name_utils.hpp"
@@ -355,18 +353,37 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
m_trafficGenerator->InvalidateTexturesCache(); m_trafficGenerator->InvalidateTexturesCache();
m_transitBuilder->RebuildSchemes(m_context, m_texMng); m_transitBuilder->RebuildSchemes(m_context, m_texMng);
// For Vulkan we initialize deferred cleaning up. CleanupTextures();
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan) break;
{
std::vector<drape_ptr<dp::HWTexture>> textures;
m_texMng->GetTexturesToCleanup(textures);
if (!textures.empty())
{
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
}
} }
case Message::Type::VisualScaleChanged:
{
ref_ptr<VisualScaleChangedMessage> msg = message;
msg->FilterDependentMessages();
CHECK(m_context != nullptr, ());
dp::TextureManager::Params params;
params.m_resPostfix = VisualParams::Instance().GetResourcePostfix();
params.m_visualScale = df::VisualParams::Instance().GetVisualScale();
#ifdef BUILD_DESIGNER
params.m_patterns = "patterns_design.txt";
#else
params.m_patterns = "patterns.txt";
#endif // BUILD_DESIGNER
m_texMng->OnVisualScaleChanged(m_context, params);
RecacheMapShapes();
RecacheGui(m_lastWidgetsInfo, false /* needResetOldGui */);
#ifdef RENDER_DEBUG_INFO_LABELS
RecacheDebugLabels();
#endif
m_trafficGenerator->InvalidateTexturesCache();
m_transitBuilder->RebuildSchemes(m_context, m_texMng);
CleanupTextures();
break; break;
} }
@@ -611,21 +628,8 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
m_arrow3dPreloadedData = Arrow3d::PreloadMesh(m_arrow3dCustomDecl, m_texMng); m_arrow3dPreloadedData = Arrow3d::PreloadMesh(m_arrow3dCustomDecl, m_texMng);
} }
// Recache map shapes.
RecacheMapShapes(); RecacheMapShapes();
CleanupTextures();
// For Vulkan we initialize deferred cleaning up.
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan)
{
std::vector<drape_ptr<dp::HWTexture>> textures;
m_texMng->GetTexturesToCleanup(textures);
if (!textures.empty())
{
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
}
}
break; break;
} }
@@ -772,6 +776,18 @@ void BackendRenderer::RecacheMapShapes()
m_commutator->PostMessage(ThreadsCommutator::RenderThread, std::move(msg), MessagePriority::Normal); m_commutator->PostMessage(ThreadsCommutator::RenderThread, std::move(msg), MessagePriority::Normal);
} }
void BackendRenderer::CleanupTextures()
{
// For Vulkan we initialize deferred cleaning up.
if (m_context->GetApiVersion() == dp::ApiVersion::Vulkan)
{
auto textures = m_texMng->GetTexturesToCleanup();
if (!textures.empty())
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
make_unique_dp<CleanupTexturesMessage>(std::move(textures)), MessagePriority::Normal);
}
}
void BackendRenderer::FlushGeometry(TileKey const & key, dp::RenderState const & state, void BackendRenderer::FlushGeometry(TileKey const & key, dp::RenderState const & state,
drape_ptr<dp::RenderBucket> && buffer) drape_ptr<dp::RenderBucket> && buffer)
{ {

View File

@@ -83,6 +83,7 @@ private:
void RecacheGui(gui::TWidgetsInitInfo const & initInfo, bool needResetOldGui); void RecacheGui(gui::TWidgetsInitInfo const & initInfo, bool needResetOldGui);
void RecacheChoosePositionMark(); void RecacheChoosePositionMark();
void RecacheMapShapes(); void RecacheMapShapes();
void CleanupTextures();
#ifdef RENDER_DEBUG_INFO_LABELS #ifdef RENDER_DEBUG_INFO_LABELS
void RecacheDebugLabels(); void RecacheDebugLabels();

View File

@@ -897,10 +897,8 @@ void DrapeEngine::UpdateVisualScale(double vs, bool needStopRendering)
if (needStopRendering) if (needStopRendering)
SetRenderingEnabled(); SetRenderingEnabled();
RecacheGui(false); m_threadCommutator->PostMessage(ThreadsCommutator::RenderThread, make_unique_dp<UpdateVisualScaleMessage>(),
RecacheMapShapes(); MessagePriority::High);
m_threadCommutator->PostMessage(ThreadsCommutator::RenderThread,
make_unique_dp<RecoverContextDependentResourcesMessage>(), MessagePriority::Normal);
} }
void DrapeEngine::UpdateMyPositionRoutingOffset(bool useDefault, int offsetY) void DrapeEngine::UpdateMyPositionRoutingOffset(bool useDefault, int offsetY)

View File

@@ -640,51 +640,11 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
break; break;
} }
case Message::Type::RecoverContextDependentResources: case Message::Type::RecoverContextDependentResources: UpdateContextDependentResources(); break;
{
UpdateContextDependentResources();
break;
}
case Message::Type::UpdateMapStyle: case Message::Type::UpdateMapStyle: UpdateAll<SwitchMapStyleMessage>(); break;
{
#ifdef BUILD_DESIGNER
classificator::Load();
#endif // BUILD_DESIGNER
// Clear all graphics. case Message::Type::VisualScaleChanged: UpdateAll<VisualScaleChangedMessage>(); break;
for (RenderLayer & layer : m_layers)
{
layer.m_renderGroups.clear();
layer.m_isDirty = false;
}
// Must be recreated on map style changing.
CHECK(m_context != nullptr, ());
m_transitBackground = make_unique_dp<ScreenQuadRenderer>(m_context);
// Invalidate read manager.
{
BaseBlockingMessage::Blocker blocker;
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
make_unique_dp<InvalidateReadManagerRectMessage>(blocker), MessagePriority::Normal);
blocker.Wait();
}
// Delete all messages which can contain render states (and textures references inside).
auto f = [this]() { InstantMessageFilter([](ref_ptr<Message> msg) { return msg->ContainsRenderState(); }); };
// Notify backend renderer and wait for completion.
{
BaseBlockingMessage::Blocker blocker;
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
make_unique_dp<SwitchMapStyleMessage>(blocker, std::move(f)), MessagePriority::Normal);
blocker.Wait();
}
UpdateContextDependentResources();
break;
}
case Message::Type::AllowAutoZoom: case Message::Type::AllowAutoZoom:
{ {
@@ -1023,6 +983,46 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
} }
} }
template <class MessageT>
void FrontendRenderer::UpdateAll()
{
#ifdef BUILD_DESIGNER
classificator::Load();
#endif // BUILD_DESIGNER
// Clear all graphics.
for (RenderLayer & layer : m_layers)
{
layer.m_renderGroups.clear();
layer.m_isDirty = false;
}
// Must be recreated on map style changing.
CHECK(m_context != nullptr, ());
m_transitBackground = make_unique_dp<ScreenQuadRenderer>(m_context);
// Invalidate read manager.
{
BaseBlockingMessage::Blocker blocker;
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
make_unique_dp<InvalidateReadManagerRectMessage>(blocker), MessagePriority::Normal);
blocker.Wait();
}
// Delete all messages which can contain render states (and textures references inside).
auto f = [this]() { InstantMessageFilter([](ref_ptr<Message> msg) { return msg->ContainsRenderState(); }); };
// Notify backend renderer and wait for completion.
{
BaseBlockingMessage::Blocker blocker;
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread, make_unique_dp<MessageT>(blocker, std::move(f)),
MessagePriority::Normal);
blocker.Wait();
}
UpdateContextDependentResources();
}
std::unique_ptr<threads::IRoutine> FrontendRenderer::CreateRoutine() std::unique_ptr<threads::IRoutine> FrontendRenderer::CreateRoutine()
{ {
return std::make_unique<Routine>(*this); return std::make_unique<Routine>(*this);

View File

@@ -247,6 +247,9 @@ private:
void ReleaseResources(); void ReleaseResources();
void UpdateContextDependentResources(); void UpdateContextDependentResources();
template <class MessageT>
void UpdateAll();
void BeginUpdateOverlayTree(ScreenBase const & modelView); void BeginUpdateOverlayTree(ScreenBase const & modelView);
void UpdateOverlayTree(ScreenBase const & modelView, drape_ptr<RenderGroup> & renderGroup); void UpdateOverlayTree(ScreenBase const & modelView, drape_ptr<RenderGroup> & renderGroup);
void EndUpdateOverlayTree(); void EndUpdateOverlayTree();

View File

@@ -103,6 +103,7 @@ std::string DebugPrint(Message::Type msgType)
case Message::Type::EnableIsolines: return "EnableIsolines"; case Message::Type::EnableIsolines: return "EnableIsolines";
case Message::Type::OnEnterBackground: return "OnEnterBackground"; case Message::Type::OnEnterBackground: return "OnEnterBackground";
case Message::Type::Arrow3dRecache: return "Arrow3dRecache"; case Message::Type::Arrow3dRecache: return "Arrow3dRecache";
case Message::Type::VisualScaleChanged: return "VisualScaleChanged";
} }
ASSERT(false, ("Unknown message type.")); ASSERT(false, ("Unknown message type."));
return "Unknown type"; return "Unknown type";

View File

@@ -103,7 +103,8 @@ public:
NotifyGraphicsReady, NotifyGraphicsReady,
EnableIsolines, EnableIsolines,
OnEnterBackground, OnEnterBackground,
Arrow3dRecache Arrow3dRecache,
VisualScaleChanged,
}; };
virtual ~Message() = default; virtual ~Message() = default;

View File

@@ -1,7 +1,6 @@
#pragma once #pragma once
#include "drape_frontend/circles_pack_shape.hpp" #include "drape_frontend/circles_pack_shape.hpp"
#include "drape_frontend/color_constants.hpp"
#include "drape_frontend/custom_features_context.hpp" #include "drape_frontend/custom_features_context.hpp"
#include "drape_frontend/drape_api.hpp" #include "drape_frontend/drape_api.hpp"
#include "drape_frontend/drape_api_builder.hpp" #include "drape_frontend/drape_api_builder.hpp"
@@ -14,8 +13,7 @@
#include "drape_frontend/overlay_batcher.hpp" #include "drape_frontend/overlay_batcher.hpp"
#include "drape_frontend/postprocess_renderer.hpp" #include "drape_frontend/postprocess_renderer.hpp"
#include "drape_frontend/render_node.hpp" #include "drape_frontend/render_node.hpp"
#include "drape_frontend/render_state_extension.hpp" #include "drape_frontend/route_shape.hpp"
#include "drape_frontend/route_builder.hpp"
#include "drape_frontend/selection_shape.hpp" #include "drape_frontend/selection_shape.hpp"
#include "drape_frontend/tile_utils.hpp" #include "drape_frontend/tile_utils.hpp"
#include "drape_frontend/traffic_generator.hpp" #include "drape_frontend/traffic_generator.hpp"
@@ -26,13 +24,10 @@
#include "drape/pointers.hpp" #include "drape/pointers.hpp"
#include "drape/render_bucket.hpp" #include "drape/render_bucket.hpp"
#include "drape/viewport.hpp"
#include "platform/location.hpp" #include "platform/location.hpp"
#include "geometry/polyline2d.hpp"
#include "geometry/rect2d.hpp" #include "geometry/rect2d.hpp"
#include "geometry/screenbase.hpp"
#include "geometry/triangle2d.hpp" #include "geometry/triangle2d.hpp"
#include <condition_variable> #include <condition_variable>
@@ -40,7 +35,6 @@
#include <map> #include <map>
#include <mutex> #include <mutex>
#include <optional> #include <optional>
#include <utility>
#include <vector> #include <vector>
namespace df namespace df
@@ -737,6 +731,12 @@ public:
Type GetType() const override { return Type::UpdateMapStyle; } Type GetType() const override { return Type::UpdateMapStyle; }
}; };
class UpdateVisualScaleMessage : public Message
{
public:
Type GetType() const override { return Type::VisualScaleChanged; }
};
class FollowRouteMessage : public Message class FollowRouteMessage : public Message
{ {
public: public:
@@ -783,6 +783,14 @@ private:
FilterMessagesHandler m_filterMessagesHandler; FilterMessagesHandler m_filterMessagesHandler;
}; };
class VisualScaleChangedMessage : public SwitchMapStyleMessage
{
public:
using SwitchMapStyleMessage::SwitchMapStyleMessage;
Type GetType() const override { return Type::VisualScaleChanged; }
};
class InvalidateMessage : public Message class InvalidateMessage : public Message
{ {
public: public:

View File

@@ -18,6 +18,8 @@ set(SRC
edits_migration.hpp edits_migration.hpp
feature_matcher.cpp feature_matcher.cpp
feature_matcher.hpp feature_matcher.hpp
feature_type_to_osm.cpp
feature_type_to_osm.hpp
new_feature_categories.cpp new_feature_categories.cpp
new_feature_categories.hpp new_feature_categories.hpp
opening_hours_ui.cpp opening_hours_ui.cpp

View File

@@ -5,6 +5,7 @@ set(SRC
editor_config_test.cpp editor_config_test.cpp
editor_notes_test.cpp editor_notes_test.cpp
feature_matcher_test.cpp feature_matcher_test.cpp
feature_type_to_osm_test.cpp
match_by_geometry_test.cpp match_by_geometry_test.cpp
new_feature_categories_test.cpp new_feature_categories_test.cpp
opening_hours_ui_test.cpp opening_hours_ui_test.cpp

View File

@@ -0,0 +1,224 @@
#include "testing/testing.hpp"
#include "editor/feature_type_to_osm.hpp"
#include "indexer/classificator.hpp"
#include "indexer/classificator_loader.hpp"
using namespace editor;
UNIT_TEST(simpleType)
{
std::string data =
"amenity|restaurant;61;\n"
"amenity|bicycle_parking;1071;\n";
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
uint32_t type = classif().GetTypeByReadableObjectName("amenity-restaurant");
std::vector<OSMTag> result = translator.OsmTagsFromType(type);
TEST_EQUAL(result.size(), 1, ());
TEST_EQUAL(result[0].key, "amenity", ());
TEST_EQUAL(result[0].value, "restaurant", ());
}
UNIT_TEST(simpleTypeWithTags)
{
std::string data =
"building;[building];;addr:housenumber;name;1;\n"
"amenity|school;[amenity=school],[education=school];;name;int_name;36;\n"
"amenity|doctors;[amenity=doctors][healthcare=doctor],[amenity=doctors],[healthcare=doctor];;name;int_name;207;\n";
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
uint32_t buildingType = classif().GetTypeByReadableObjectName("building");
std::vector<OSMTag> buildingResult = translator.OsmTagsFromType(buildingType);
TEST_EQUAL(buildingResult.size(), 1, ());
TEST_EQUAL(buildingResult[0].key, "building", ());
TEST_EQUAL(buildingResult[0].value, "yes", ());
uint32_t schoolType = classif().GetTypeByReadableObjectName("amenity-school");
std::vector<OSMTag> schoolResult = translator.OsmTagsFromType(schoolType);
TEST_EQUAL(schoolResult.size(), 1, ());
TEST_EQUAL(schoolResult[0].key, "amenity", ());
TEST_EQUAL(schoolResult[0].value, "school", ());
uint32_t doctorType = classif().GetTypeByReadableObjectName("amenity-doctors");
std::vector<OSMTag> doctorResult = translator.OsmTagsFromType(doctorType);
TEST_EQUAL(doctorResult.size(), 2, ());
TEST_EQUAL(doctorResult[0].key, "amenity", ());
TEST_EQUAL(doctorResult[0].value, "doctors", ());
TEST_EQUAL(doctorResult[1].key, "healthcare", ());
TEST_EQUAL(doctorResult[1].value, "doctor", ());
}
UNIT_TEST(complexType)
{
std::string data =
"building;[building];;addr:housenumber;name;1;\n"
" # comment that should be ignored\n"
"\n"
"amenity|restaurant;61;\n"
"tourism|information|office;[tourism=information][information=office];;name;int_name;313;\n"
"historic|castle|fortress;[historic=castle][castle_type=fortress],[historic=fortress];;name;int_name;1144;\n"
"#comment\n"
"amenity|place_of_worship|christian|mormon;[amenity=place_of_worship][religion=christian][denomination=mormon];;name;int_name;1572;\n";
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
uint32_t officeType = classif().GetTypeByReadableObjectName("tourism-information-office");
std::vector<OSMTag> officeResult = translator.OsmTagsFromType(officeType);
TEST_EQUAL(officeResult.size(), 2, ());
TEST_EQUAL(officeResult[0].key, "tourism", ());
TEST_EQUAL(officeResult[0].value, "information", ());
TEST_EQUAL(officeResult[1].key, "information", ());
TEST_EQUAL(officeResult[1].value, "office", ());
uint32_t fortressType = classif().GetTypeByReadableObjectName("historic-castle-fortress");
std::vector<OSMTag> fortressResult = translator.OsmTagsFromType(fortressType);
TEST_EQUAL(fortressResult.size(), 2, ());
TEST_EQUAL(fortressResult[0].key, "historic", ());
TEST_EQUAL(fortressResult[0].value, "castle", ());
TEST_EQUAL(fortressResult[1].key, "castle_type", ());
TEST_EQUAL(fortressResult[1].value, "fortress", ());
uint32_t mormonType = classif().GetTypeByReadableObjectName("amenity-place_of_worship-christian-mormon");
std::vector<OSMTag> mormonResult = translator.OsmTagsFromType(mormonType);
TEST_EQUAL(mormonResult.size(), 3, ());
TEST_EQUAL(mormonResult[0].key, "amenity", ());
TEST_EQUAL(mormonResult[0].value, "place_of_worship", ());
TEST_EQUAL(mormonResult[1].key, "religion", ());
TEST_EQUAL(mormonResult[1].value, "christian", ());
TEST_EQUAL(mormonResult[2].key, "denomination", ());
TEST_EQUAL(mormonResult[2].value, "mormon", ());
}
UNIT_TEST(mandatorySelector)
{
std::string data =
"amenity|parking|fee;[amenity=parking][fee];;name;int_name;125;\n"
"highway|track|bridge;[highway=track][bridge?];;name;int_name;193;\n"
"shop;[shop?];;name;int_name;943;\n"
"disusedbusiness;[disused:shop?],[disused:amenity=restaurant],[disused:amenity=fast_food],[disused:amenity=cafe],[disused:amenity=pub],[disused:amenity=bar];;;;1237;\n";
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
uint32_t parkingType = classif().GetTypeByReadableObjectName("amenity-parking-fee");
std::vector<OSMTag> parkingResult = translator.OsmTagsFromType(parkingType);
TEST_EQUAL(parkingResult.size(), 2, ());
TEST_EQUAL(parkingResult[0].key, "amenity", ());
TEST_EQUAL(parkingResult[0].value, "parking", ());
TEST_EQUAL(parkingResult[1].key, "fee", ());
TEST_EQUAL(parkingResult[1].value, "yes", ());
uint32_t trackType = classif().GetTypeByReadableObjectName("highway-track-bridge");
std::vector<OSMTag> trackResult = translator.OsmTagsFromType(trackType);
TEST_EQUAL(trackResult.size(), 2, ());
TEST_EQUAL(trackResult[0].key, "highway", ());
TEST_EQUAL(trackResult[0].value, "track", ());
TEST_EQUAL(trackResult[1].key, "bridge", ());
TEST_EQUAL(trackResult[1].value, "yes", ());
uint32_t shopType = classif().GetTypeByReadableObjectName("shop");
std::vector<OSMTag> shopResult = translator.OsmTagsFromType(shopType);
TEST_EQUAL(shopResult.size(), 1, ());
TEST_EQUAL(shopResult[0].key, "shop", ());
TEST_EQUAL(shopResult[0].value, "yes", ());
uint32_t disusedType = classif().GetTypeByReadableObjectName("disusedbusiness");
std::vector<OSMTag> disusedResult = translator.OsmTagsFromType(disusedType);
TEST_EQUAL(disusedResult.size(), 1, ());
TEST_EQUAL(disusedResult[0].key, "disused:shop", ());
TEST_EQUAL(disusedResult[0].value, "yes", ());
}
UNIT_TEST(forbiddenSelector)
{
std::string data =
"amenity|lounger;[amenity=lounger][!seasonal];;name;int_name;153;\n"
"amenity|charging_station|motorcar|small;[amenity=charging_station][motorcar?][!capacity],[amenity=charging_station][motorcar?][capacity=1],[amenity=charging_station][motorcar?][capacity=2];;name;int_name;201;\n";
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
uint32_t loungerType = classif().GetTypeByReadableObjectName("amenity-lounger");
std::vector<OSMTag> loungerResult = translator.OsmTagsFromType(loungerType);
TEST_EQUAL(loungerResult.size(), 1, ());
TEST_EQUAL(loungerResult[0].key, "amenity", ());
TEST_EQUAL(loungerResult[0].value, "lounger", ());
uint32_t chargingType = classif().GetTypeByReadableObjectName("amenity-charging_station-motorcar-small");
std::vector<OSMTag> chargingResult = translator.OsmTagsFromType(chargingType);
TEST_EQUAL(chargingResult.size(), 2, ());
TEST_EQUAL(chargingResult[0].key, "amenity", ());
TEST_EQUAL(chargingResult[0].value, "charging_station", ());
TEST_EQUAL(chargingResult[1].key, "motorcar", ());
TEST_EQUAL(chargingResult[1].value, "yes", ());
}
UNIT_TEST(ignoreComments)
{
std::string data =
"building;[building];;addr:housenumber;name;1;\n"
" # comment that should be ignored\n"
"\n"
"deprecated:waterway|riverbank:05.2024;52;x\n"
"amenity|restaurant;61;\n"
"moved:amenity|telephone:05.2024;122;amenity|telephone\n"
"natural|lake;564;natural|water|lake\n"; // moved type, should be ignored
classificator::Load();
TypeToOSMTranslator translator(false);
std::stringstream s(data);
translator.LoadFromStream(s);
}
UNIT_TEST(loadConfigFile)
{
TypeToOSMTranslator translator(false);
translator.LoadConfigFile();
size_t size = translator.GetStorage().size();
LOG(LINFO, ("Size of feature type storage:", size));
ASSERT(size > 1300, ());
ASSERT(size < 1700, ());
}
UNIT_TEST(testWithRealFile)
{
classificator::Load();
uint32_t restaurantType = classif().GetTypeByReadableObjectName("amenity-restaurant");
std::vector<OSMTag> restaurantResult = GetOSMTranslator().OsmTagsFromType(restaurantType);
TEST_EQUAL(restaurantResult.size(), 1, ());
TEST_EQUAL(restaurantResult[0].key, "amenity", ());
TEST_EQUAL(restaurantResult[0].value, "restaurant", ());
uint32_t officeType = classif().GetTypeByReadableObjectName("tourism-information-office");
std::vector<OSMTag> officeResult = GetOSMTranslator().OsmTagsFromType(officeType);
TEST_EQUAL(officeResult.size(), 2, ());
TEST_EQUAL(officeResult[0].key, "tourism", ());
TEST_EQUAL(officeResult[0].value, "information", ());
TEST_EQUAL(officeResult[1].key, "information", ());
TEST_EQUAL(officeResult[1].value, "office", ());
}

View File

@@ -406,7 +406,7 @@ void EditorTest::GetFeatureStatusTest()
TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), FeatureStatus::Created, ()); TEST_EQUAL(editor.GetFeatureStatus(emo.GetID()), FeatureStatus::Created, ());
} }
void EditorTest::IsFeatureUploadedTest() void EditorTest::AreSomeFeatureChangesUploadedTest()
{ {
auto & editor = osm::Editor::Instance(); auto & editor = osm::Editor::Instance();
@@ -419,19 +419,25 @@ void EditorTest::IsFeatureUploadedTest()
}); });
ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft) ForEachCafeAtPoint(m_dataSource, m2::PointD(1.0, 1.0), [&editor](FeatureType & ft)
{ TEST(!editor.IsFeatureUploaded(ft.GetID().m_mwmId, ft.GetID().m_index), ()); }); { TEST(!editor.AreSomeFeatureChangesUploaded(ft.GetID().m_mwmId, ft.GetID().m_index), ()); });
osm::EditableMapObject emo; osm::EditableMapObject emo;
CreateCafeAtPoint({3.0, 3.0}, mwmId, emo); CreateCafeAtPoint({3.0, 3.0}, mwmId, emo);
TEST(!editor.IsFeatureUploaded(emo.GetID().m_mwmId, emo.GetID().m_index), ()); TEST(!editor.AreSomeFeatureChangesUploaded(emo.GetID().m_mwmId, emo.GetID().m_index), ());
// generate journal with uploaded changes
osm::EditJournal journal;
journal.AddTagChange("addr:housenumber", "", "42");
journal.Clear();
emo.SetJournal(std::move(journal));
pugi::xml_document doc; pugi::xml_document doc;
GenerateUploadedFeature(mwmId, emo, doc); GenerateUploadedFeature(mwmId, emo, doc);
editor.m_storage->Save(doc); editor.m_storage->Save(doc);
editor.LoadEdits(); editor.LoadEdits();
TEST(editor.IsFeatureUploaded(emo.GetID().m_mwmId, emo.GetID().m_index), ()); TEST(editor.AreSomeFeatureChangesUploaded(emo.GetID().m_mwmId, emo.GetID().m_index), ());
} }
void EditorTest::DeleteFeatureTest() void EditorTest::DeleteFeatureTest()
@@ -1309,9 +1315,9 @@ UNIT_CLASS_TEST(EditorTest, GetFeatureStatusTest)
EditorTest::GetFeatureStatusTest(); EditorTest::GetFeatureStatusTest();
} }
UNIT_CLASS_TEST(EditorTest, IsFeatureUploadedTest) UNIT_CLASS_TEST(EditorTest, AreSomeFeatureChangesUploadedTest)
{ {
EditorTest::IsFeatureUploadedTest(); EditorTest::AreSomeFeatureChangesUploadedTest();
} }
UNIT_CLASS_TEST(EditorTest, DeleteFeatureTest) UNIT_CLASS_TEST(EditorTest, DeleteFeatureTest)

View File

@@ -31,7 +31,7 @@ public:
void SetIndexTest(); void SetIndexTest();
void GetEditedFeatureStreetTest(); void GetEditedFeatureStreetTest();
void GetFeatureStatusTest(); void GetFeatureStatusTest();
void IsFeatureUploadedTest(); void AreSomeFeatureChangesUploadedTest();
void DeleteFeatureTest(); void DeleteFeatureTest();
void ClearAllLocalEditsTest(); void ClearAllLocalEditsTest();
void GetFeaturesByStatusTest(); void GetFeaturesByStatusTest();

View File

@@ -0,0 +1,166 @@
#include "editor/feature_type_to_osm.hpp"
#include "base/assert.hpp"
#include "coding/reader_streambuf.hpp"
#include "indexer/classificator.hpp"
#include "platform/platform.hpp"
#include <string>
namespace editor
{
TypeToOSMTranslator::TypeToOSMTranslator(bool initialize)
{
if (initialize)
LoadConfigFile();
}
void TypeToOSMTranslator::LoadConfigFile()
{
Platform & p = GetPlatform();
std::unique_ptr<ModelReader> reader = p.GetReader("mapcss-mapping.csv");
ReaderStreamBuf buffer(std::move(reader));
std::istream s(&buffer);
LoadFromStream(s);
}
void TypeToOSMTranslator::LoadFromStream(std::istream & s)
{
m_storage.clear();
std::string line;
while (s.good())
{
getline(s, line);
strings::Trim(line);
// skip empty lines, comments, deprecated and moved types
if (line.empty() || line.front() == '#' || line.starts_with("deprecated") || line.starts_with("moved") ||
line.back() != ';')
continue;
std::vector<std::string_view> const rowTokens = strings::Tokenize(line, ";");
if (rowTokens.size() < 2)
{
ASSERT(false, ("Invalid feature type definition:", line));
continue;
}
// Get internal feature type
std::vector<std::string_view> const featureTypeTokens = strings::Tokenize(rowTokens[0], "|");
uint32_t const type = classif().GetTypeByPathSafe(featureTypeTokens);
ASSERT(type != IndexAndTypeMapping::INVALID_TYPE, ("Feature with invalid type:", line));
if (rowTokens.size() == 2)
{
// Derive OSM tags from type name
ASSERT(featureTypeTokens.size() <= 2, ("OSM tags can not be inferred from name:", line));
OSMTag osmTag;
// e.g. "amenity-restaurant"
if (featureTypeTokens.size() >= 2)
{
osmTag.key = featureTypeTokens[0];
osmTag.value = featureTypeTokens[1];
}
// e.g. "building"
else if (featureTypeTokens.size() == 1)
{
osmTag.key = featureTypeTokens[0];
osmTag.value = "yes";
}
m_storage.insert({type, {osmTag}});
}
else
{
// OSM tags are listed in the feature type entry
std::vector<std::string_view> const osmTagTokens = strings::Tokenize(rowTokens[1], ",");
// First entry is the best practice way to tag a feature
std::string_view const osmTagList = osmTagTokens[0];
// Process OSM tag list (e.g. "[tourism=information][information=office]")
std::vector<OSMTag> osmTags;
size_t pos = 0;
while ((pos = osmTagList.find('[', pos)) != std::string::npos)
{
size_t end = osmTagList.find(']', pos);
if (end == std::string::npos)
{
ASSERT(false, ("Bracket not closed in OSM tag:", line));
break;
}
std::string_view keyValuePair = osmTagList.substr(pos + 1, end - pos - 1);
if (keyValuePair.empty())
{
ASSERT(false, ("Key value pair is empty:", line));
break;
}
size_t equalSign = keyValuePair.find('=');
if (equalSign != std::string::npos)
{
// Tags in key=value format
OSMTag osmTag;
osmTag.key = keyValuePair.substr(0, equalSign);
osmTag.value = keyValuePair.substr(equalSign + 1);
// mapcss-mapping.csv uses 'not' instead of 'no' as a workaround for the rendering engine
if (osmTag.value == "not")
osmTag.value = "no";
osmTags.push_back(osmTag);
}
else if (keyValuePair.front() == '!')
{
// Tags with "forbidden" selector '!' are skipped
}
else
{
// Tags with optional "mandatory" selector '?'
if (keyValuePair.back() == '?')
keyValuePair.remove_suffix(1);
OSMTag osmTag;
osmTag.key = keyValuePair;
osmTag.value = "yes";
osmTags.push_back(osmTag);
}
pos = end + 1;
}
ASSERT(!osmTags.empty(), ("No OSM tags found for feature:", line));
m_storage.insert({type, osmTags});
}
}
}
std::vector<OSMTag> const & TypeToOSMTranslator::OsmTagsFromType(uint32_t type) const
{
auto it = m_storage.find(type);
if (it == m_storage.end())
{
ASSERT(false, ("OSM tags for type", type, "could not be found"));
return kEmptyResult;
}
return it->second;
}
TypeToOSMTranslator const & GetOSMTranslator()
{
static TypeToOSMTranslator translator;
return translator;
}
} // namespace editor

View File

@@ -0,0 +1,36 @@
#pragma once
#include <cstdint>
#include <unordered_map>
#include <vector>
namespace editor
{
struct OSMTag
{
std::string key;
std::string value;
};
class TypeToOSMTranslator
{
public:
std::vector<OSMTag> static constexpr kEmptyResult = {};
TypeToOSMTranslator() : TypeToOSMTranslator(true) {}
explicit TypeToOSMTranslator(bool initialize);
void LoadConfigFile();
void LoadFromStream(std::istream & s);
std::vector<OSMTag> const & OsmTagsFromType(uint32_t type) const;
std::unordered_map<uint32_t, std::vector<OSMTag>> const & GetStorage() const { return m_storage; }
private:
std::unordered_map<uint32_t, std::vector<OSMTag>> m_storage;
};
TypeToOSMTranslator const & GetOSMTranslator();
} // namespace editor

View File

@@ -279,10 +279,10 @@ FeatureStatus Editor::GetFeatureStatus(FeatureID const & fid) const
return GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index); return GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index);
} }
bool Editor::IsFeatureUploaded(MwmId const & mwmId, uint32_t index) const bool Editor::AreSomeFeatureChangesUploaded(MwmId const & mwmId, uint32_t index) const
{ {
auto const features = m_features.Get(); auto const features = m_features.Get();
return IsFeatureUploadedImpl(*features, mwmId, index); return AreSomeFeatureChangesUploadedImpl(*features, mwmId, index);
} }
void Editor::DeleteFeature(FeatureID const & fid) void Editor::DeleteFeature(FeatureID const & fid)
@@ -425,7 +425,7 @@ bool Editor::RollBackChanges(FeatureID const & fid)
{ {
CHECK_THREAD_CHECKER(MainThreadChecker, ("")); CHECK_THREAD_CHECKER(MainThreadChecker, (""));
if (IsFeatureUploaded(fid.m_mwmId, fid.m_index)) if (AreSomeFeatureChangesUploaded(fid.m_mwmId, fid.m_index))
return false; return false;
return RemoveFeature(fid); return RemoveFeature(fid);
@@ -982,7 +982,7 @@ void Editor::CreateNote(ms::LatLon const & latLon, FeatureID const & fid, featur
"but was not found on the ground.\n"; "but was not found on the ground.\n";
auto const features = m_features.Get(); auto const features = m_features.Get();
auto const isCreated = GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index) == FeatureStatus::Created; auto const isCreated = GetFeatureStatusImpl(*features, fid.m_mwmId, fid.m_index) == FeatureStatus::Created;
auto const createdAndUploaded = (isCreated && IsFeatureUploadedImpl(*features, fid.m_mwmId, fid.m_index)); auto const createdAndUploaded = (isCreated && AreSomeFeatureChangesUploadedImpl(*features, fid.m_mwmId, fid.m_index));
CHECK(!isCreated || createdAndUploaded, ()); CHECK(!isCreated || createdAndUploaded, ());
if (createdAndUploaded) if (createdAndUploaded)
@@ -1177,10 +1177,10 @@ FeatureStatus Editor::GetFeatureStatusImpl(FeaturesContainer const & features, M
return featureInfo->m_status; return featureInfo->m_status;
} }
bool Editor::IsFeatureUploadedImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index) bool Editor::AreSomeFeatureChangesUploadedImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index)
{ {
auto const * info = GetFeatureTypeInfo(features, mwmId, index); auto const * info = GetFeatureTypeInfo(features, mwmId, index);
return info && info->m_uploadStatus == kUploaded; return info && !info->m_object.GetJournal().GetJournalHistory().empty();
} }
void Editor::UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal, void Editor::UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal,

View File

@@ -125,7 +125,7 @@ public:
FeatureStatus GetFeatureStatus(FeatureID const & fid) const; FeatureStatus GetFeatureStatus(FeatureID const & fid) const;
/// @returns true if a feature was uploaded to osm. /// @returns true if a feature was uploaded to osm.
bool IsFeatureUploaded(MwmId const & mwmId, uint32_t index) const; bool AreSomeFeatureChangesUploaded(MwmId const & mwmId, uint32_t index) const;
/// Marks feature as "deleted" from MwM file. /// Marks feature as "deleted" from MwM file.
void DeleteFeature(FeatureID const & fid); void DeleteFeature(FeatureID const & fid);
@@ -240,7 +240,7 @@ private:
static FeatureStatus GetFeatureStatusImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index); static FeatureStatus GetFeatureStatusImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index);
static bool IsFeatureUploadedImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index); static bool AreSomeFeatureChangesUploadedImpl(FeaturesContainer const & features, MwmId const & mwmId, uint32_t index);
static void UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal, static void UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal,
ChangesetWrapper & changeset); ChangesetWrapper & changeset);

View File

@@ -1,4 +1,6 @@
#include "editor/xml_feature.hpp" #include "editor/xml_feature.hpp"
#include "editor/feature_type_to_osm.hpp"
#include "editor/keys_to_remove.hpp" #include "editor/keys_to_remove.hpp"
#include "indexer/classificator.hpp" #include "indexer/classificator.hpp"
@@ -640,36 +642,16 @@ void XMLFeature::RemoveTag(string_view key)
void XMLFeature::SetOSMTagsForType(uint32_t type) void XMLFeature::SetOSMTagsForType(uint32_t type)
{ {
if (ftypes::IsRecyclingCentreChecker::Instance()(type)) if (ftypes::IsAddressChecker::Instance()(type))
{
SetTagValue("amenity", "recycling");
SetTagValue("recycling_type", "centre");
}
else if (ftypes::IsRecyclingContainerChecker::Instance()(type))
{
SetTagValue("amenity", "recycling");
SetTagValue("recycling_type", "container");
}
else if (ftypes::IsAddressChecker::Instance()(type))
{ {
// Addresses don't have a category tag // Addresses don't have a category tag
return;
} }
else
{
string const strType = classif().GetReadableObjectName(type);
strings::SimpleTokenizer iter(strType, "-");
string_view const k = *iter;
if (++iter) std::vector<OSMTag> const & osmTags = GetOSMTranslator().OsmTagsFromType(type);
{
// Main type is stored as "k=amenity v=restaurant" for (auto const & osmTag : osmTags)
SetTagValue(k, *iter); SetTagValue(osmTag.key, osmTag.value);
}
else {
// Main type is stored as "k=building v=yes"
SetTagValue(k, kYes);
}
}
} }
void XMLFeature::UpdateOSMTag(std::string_view key, std::string_view value) void XMLFeature::UpdateOSMTag(std::string_view key, std::string_view value)

View File

@@ -126,6 +126,7 @@ copy_resources(
patterns.txt patterns.txt
transit_colors.txt transit_colors.txt
types.txt types.txt
mapcss-mapping.csv
World.mwm World.mwm
WorldCoasts.mwm WorldCoasts.mwm
) )

View File

@@ -8,6 +8,9 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
271DC2172EC60C0C00442D94 /* keys_to_remove.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */; }; 271DC2172EC60C0C00442D94 /* keys_to_remove.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */; };
27FDBF1B2EEEFC3F0045621D /* feature_type_to_osm_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27FDBF1A2EEEFC3F0045621D /* feature_type_to_osm_test.cpp */; };
27FDBF1E2EEEFC5A0045621D /* feature_type_to_osm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27FDBF1D2EEEFC5A0045621D /* feature_type_to_osm.cpp */; };
27FDBF1F2EEEFC5A0045621D /* feature_type_to_osm.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 27FDBF1C2EEEFC5A0045621D /* feature_type_to_osm.hpp */; };
340C20DE1C3E4DFD00111D22 /* osm_auth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */; }; 340C20DE1C3E4DFD00111D22 /* osm_auth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */; };
340C20DF1C3E4DFD00111D22 /* osm_auth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */; }; 340C20DF1C3E4DFD00111D22 /* osm_auth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */; };
340DC8291C4E71E500EAA2CC /* changeset_wrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */; }; 340DC8291C4E71E500EAA2CC /* changeset_wrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */; };
@@ -77,6 +80,10 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
270C9C212E16AABF00ABA688 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = ../../libs/editor/module.modulemap; sourceTree = SOURCE_ROOT; }; 270C9C212E16AABF00ABA688 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = ../../libs/editor/module.modulemap; sourceTree = SOURCE_ROOT; };
271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = keys_to_remove.hpp; sourceTree = "<group>"; }; 271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = keys_to_remove.hpp; sourceTree = "<group>"; };
27998A9E2EEEFE09001EAFD0 /* mapcss-mapping.csv */ = {isa = PBXFileReference; lastKnownFileType = text; name = "mapcss-mapping.csv"; path = "../../data/mapcss-mapping.csv"; sourceTree = SOURCE_ROOT; };
27FDBF1A2EEEFC3F0045621D /* feature_type_to_osm_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = feature_type_to_osm_test.cpp; sourceTree = "<group>"; };
27FDBF1C2EEEFC5A0045621D /* feature_type_to_osm.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = feature_type_to_osm.hpp; sourceTree = "<group>"; };
27FDBF1D2EEEFC5A0045621D /* feature_type_to_osm.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = feature_type_to_osm.cpp; sourceTree = "<group>"; };
340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_auth.cpp; sourceTree = "<group>"; }; 340C20DC1C3E4DFD00111D22 /* osm_auth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_auth.cpp; sourceTree = "<group>"; };
340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_auth.hpp; sourceTree = "<group>"; }; 340C20DD1C3E4DFD00111D22 /* osm_auth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_auth.hpp; sourceTree = "<group>"; };
340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = changeset_wrapper.cpp; sourceTree = "<group>"; }; 340DC8271C4E71E500EAA2CC /* changeset_wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = changeset_wrapper.cpp; sourceTree = "<group>"; };
@@ -199,6 +206,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3496AC041DC204B700C5DDBA /* editor.config */, 3496AC041DC204B700C5DDBA /* editor.config */,
27998A9E2EEEFE09001EAFD0 /* mapcss-mapping.csv */,
270C9C212E16AABF00ABA688 /* module.modulemap */, 270C9C212E16AABF00ABA688 /* module.modulemap */,
34F5586E1DBF49B200A4FC11 /* common-debug.xcconfig */, 34F5586E1DBF49B200A4FC11 /* common-debug.xcconfig */,
34F5586F1DBF49B200A4FC11 /* common-release.xcconfig */, 34F5586F1DBF49B200A4FC11 /* common-release.xcconfig */,
@@ -242,6 +250,8 @@
6715560420BEC331002BA3B4 /* edits_migration.hpp */, 6715560420BEC331002BA3B4 /* edits_migration.hpp */,
3D052486200F62ED00F24998 /* feature_matcher.cpp */, 3D052486200F62ED00F24998 /* feature_matcher.cpp */,
3D052485200F62ED00F24998 /* feature_matcher.hpp */, 3D052485200F62ED00F24998 /* feature_matcher.hpp */,
27FDBF1D2EEEFC5A0045621D /* feature_type_to_osm.cpp */,
27FDBF1C2EEEFC5A0045621D /* feature_type_to_osm.hpp */,
271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */, 271DC2162EC60C0C00442D94 /* keys_to_remove.hpp */,
6715565220BF0F86002BA3B4 /* new_feature_categories.cpp */, 6715565220BF0F86002BA3B4 /* new_feature_categories.cpp */,
6715565320BF0F87002BA3B4 /* new_feature_categories.hpp */, 6715565320BF0F87002BA3B4 /* new_feature_categories.hpp */,
@@ -270,6 +280,7 @@
3496ABD21DC2034900C5DDBA /* editor_config_test.cpp */, 3496ABD21DC2034900C5DDBA /* editor_config_test.cpp */,
3496ABD31DC2034900C5DDBA /* editor_notes_test.cpp */, 3496ABD31DC2034900C5DDBA /* editor_notes_test.cpp */,
3D052489200F630000F24998 /* feature_matcher_test.cpp */, 3D052489200F630000F24998 /* feature_matcher_test.cpp */,
27FDBF1A2EEEFC3F0045621D /* feature_type_to_osm_test.cpp */,
3D05248A200F630000F24998 /* match_by_geometry_test.cpp */, 3D05248A200F630000F24998 /* match_by_geometry_test.cpp */,
6715560920BEF0A4002BA3B4 /* new_feature_categories_test.cpp */, 6715560920BEF0A4002BA3B4 /* new_feature_categories_test.cpp */,
3496ABD41DC2034900C5DDBA /* opening_hours_ui_test.cpp */, 3496ABD41DC2034900C5DDBA /* opening_hours_ui_test.cpp */,
@@ -338,6 +349,7 @@
34527C521C89B1770015050E /* editor_config.hpp in Headers */, 34527C521C89B1770015050E /* editor_config.hpp in Headers */,
675B562820D2706000A521D2 /* editable_feature_source.hpp in Headers */, 675B562820D2706000A521D2 /* editable_feature_source.hpp in Headers */,
6715565520BF0F87002BA3B4 /* new_feature_categories.hpp in Headers */, 6715565520BF0F87002BA3B4 /* new_feature_categories.hpp in Headers */,
27FDBF1F2EEEFC5A0045621D /* feature_type_to_osm.hpp in Headers */,
6715560820BEC332002BA3B4 /* edits_migration.hpp in Headers */, 6715560820BEC332002BA3B4 /* edits_migration.hpp in Headers */,
3D052487200F62EE00F24998 /* feature_matcher.hpp in Headers */, 3D052487200F62EE00F24998 /* feature_matcher.hpp in Headers */,
271DC2172EC60C0C00442D94 /* keys_to_remove.hpp in Headers */, 271DC2172EC60C0C00442D94 /* keys_to_remove.hpp in Headers */,
@@ -470,6 +482,7 @@
340C20DE1C3E4DFD00111D22 /* osm_auth.cpp in Sources */, 340C20DE1C3E4DFD00111D22 /* osm_auth.cpp in Sources */,
6715560720BEC332002BA3B4 /* osm_editor.cpp in Sources */, 6715560720BEC332002BA3B4 /* osm_editor.cpp in Sources */,
3D052488200F62EE00F24998 /* feature_matcher.cpp in Sources */, 3D052488200F62EE00F24998 /* feature_matcher.cpp in Sources */,
27FDBF1E2EEEFC5A0045621D /* feature_type_to_osm.cpp in Sources */,
3D489BEF1D4F67E10052AA38 /* editor_storage.cpp in Sources */, 3D489BEF1D4F67E10052AA38 /* editor_storage.cpp in Sources */,
3411387A1C15AE42002E3B3E /* ui2oh.cpp in Sources */, 3411387A1C15AE42002E3B3E /* ui2oh.cpp in Sources */,
340DC8291C4E71E500EAA2CC /* changeset_wrapper.cpp in Sources */, 340DC8291C4E71E500EAA2CC /* changeset_wrapper.cpp in Sources */,
@@ -488,6 +501,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
3496ABE11DC2035800C5DDBA /* config_loader_test.cpp in Sources */, 3496ABE11DC2035800C5DDBA /* config_loader_test.cpp in Sources */,
27FDBF1B2EEEFC3F0045621D /* feature_type_to_osm_test.cpp in Sources */,
671555E820BDC5D3002BA3B4 /* osm_editor_test.cpp in Sources */, 671555E820BDC5D3002BA3B4 /* osm_editor_test.cpp in Sources */,
3496ABE21DC2035800C5DDBA /* editor_config_test.cpp in Sources */, 3496ABE21DC2035800C5DDBA /* editor_config_test.cpp in Sources */,
FACB76B826B89DF700810C9C /* feature_matcher_test.cpp in Sources */, FACB76B826B89DF700810C9C /* feature_matcher_test.cpp in Sources */,