Merge pull request #5104 from bykoianko/release-70-to-master
release-70 to master
|
@ -149,8 +149,9 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
|
|||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
|
||||
NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
|
||||
message(STATUS "Using gcc specific binutils for LTO.")
|
||||
set(CMAKE_AR "/usr/bin/gcc-ar")
|
||||
set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")
|
||||
get_filename_component(GCC_PATH "${CMAKE_CXX_COMPILER}" PATH)
|
||||
set(CMAKE_AR "${GCC_PATH}/gcc-ar")
|
||||
set(CMAKE_RANLIB "${GCC_PATH}/gcc-ranlib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -4,8 +4,8 @@ propMinSdkVersion=15
|
|||
propTargetSdkVersion=22
|
||||
propCompileSdkVersion=23
|
||||
propBuildToolsVersion=22.0.1
|
||||
propVersionCode=700
|
||||
propVersionName=7.0.0
|
||||
propVersionCode=705
|
||||
propVersionName=7.0.5
|
||||
propDebugNdkFlags=V=1 NDK_DEBUG=1 DEBUG=1
|
||||
propReleaseNdkFlags=V=1 NDK_DEBUG=0 PRODUCTION=1
|
||||
org.gradle.daemon=true
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "map/place_page_info.hpp"
|
||||
|
||||
#include "base/string_utils.hpp"
|
||||
|
||||
namespace usermark_helper
|
||||
{
|
||||
using search::AddressInfo;
|
||||
|
@ -22,23 +24,25 @@ void InjectMetadata(JNIEnv * env, jclass const clazz, jobject const mapObject, f
|
|||
}
|
||||
}
|
||||
|
||||
jobject CreateBanner(JNIEnv * env, string const & bannerTitleId, string const & bannerMessageId,
|
||||
string const & bannerIconId, string const & bannerUrl)
|
||||
jobject CreateBanner(JNIEnv * env, string const & id, string const & titleId,
|
||||
string const & messageId, string const & iconId,
|
||||
string const & url, vector<string> const & sourceTypes)
|
||||
{
|
||||
auto const types = strings::JoinStrings(sourceTypes, ", ");
|
||||
static jmethodID const bannerCtorId = jni::GetConstructorID(
|
||||
env, g_bannerClazz,
|
||||
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
|
||||
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;"
|
||||
"Ljava/lang/String;)V");
|
||||
|
||||
return env->NewObject(g_bannerClazz, bannerCtorId, jni::ToJavaString(env, bannerTitleId),
|
||||
jni::ToJavaString(env, bannerMessageId),
|
||||
jni::ToJavaString(env, bannerIconId), jni::ToJavaString(env, bannerUrl));
|
||||
return env->NewObject(g_bannerClazz, bannerCtorId, jni::ToJavaString(env, id),
|
||||
jni::ToJavaString(env, titleId), jni::ToJavaString(env, messageId),
|
||||
jni::ToJavaString(env, iconId), jni::ToJavaString(env, url),
|
||||
jni::ToJavaString(env, types));
|
||||
}
|
||||
|
||||
jobject CreateMapObject(JNIEnv * env, int mapObjectType, string const & title,
|
||||
string const & subtitle, double lat, double lon, string const & address,
|
||||
Metadata const & metadata, string const & apiId, bool hasBanner,
|
||||
string const & bannerTitleId, string const & bannerMessageId,
|
||||
string const & bannerIconId, string const & bannerUrl,
|
||||
Metadata const & metadata, string const & apiId, jobject jbanner,
|
||||
bool isReachableByTaxi)
|
||||
{
|
||||
// public MapObject(@MapObjectType int mapObjectType, String title, String subtitle, double lat,
|
||||
|
@ -48,10 +52,6 @@ jobject CreateMapObject(JNIEnv * env, int mapObjectType, string const & title,
|
|||
"(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;DDLjava/lang/"
|
||||
"String;Lcom/mapswithme/maps/bookmarks/data/Banner;Z)V");
|
||||
|
||||
jobject jbanner = nullptr;
|
||||
if (hasBanner)
|
||||
jbanner = CreateBanner(env, bannerTitleId, bannerMessageId, bannerIconId, bannerUrl);
|
||||
|
||||
jobject mapObject =
|
||||
env->NewObject(g_mapObjectClazz, ctorId, mapObjectType, jni::ToJavaString(env, title),
|
||||
jni::ToJavaString(env, subtitle), jni::ToJavaString(env, address), lat, lon,
|
||||
|
@ -63,6 +63,11 @@ jobject CreateMapObject(JNIEnv * env, int mapObjectType, string const & title,
|
|||
|
||||
jobject CreateMapObject(JNIEnv * env, place_page::Info const & info)
|
||||
{
|
||||
jobject jbanner = nullptr;
|
||||
if (info.HasBanner())
|
||||
jbanner = CreateBanner(env, info.GetBannerId(), info.GetBannerTitleId(),
|
||||
info.GetBannerMessageId(), info.GetBannerIconId(),
|
||||
info.GetBannerUrl(), info.GetRawTypes());
|
||||
if (info.IsBookmark())
|
||||
{
|
||||
// public Bookmark(@IntRange(from = 0) int categoryId, @IntRange(from = 0) int bookmarkId,
|
||||
|
@ -70,11 +75,6 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info)
|
|||
static jmethodID const ctorId = jni::GetConstructorID(
|
||||
env, g_bookmarkClazz, "(IILjava/lang/String;Lcom/mapswithme/maps/bookmarks/data/Banner;Z)V");
|
||||
|
||||
jobject jbanner = nullptr;
|
||||
if (info.HasBanner())
|
||||
jbanner = CreateBanner(env, info.GetBannerTitleId(), info.GetBannerMessageId(),
|
||||
info.GetBannerIconId(), info.GetBannerUrl());
|
||||
|
||||
auto const & bac = info.GetBookmarkAndCategory();
|
||||
BookmarkCategory * cat = g_framework->NativeFramework()->GetBmCategory(bac.m_categoryIndex);
|
||||
BookmarkData const & data =
|
||||
|
@ -98,20 +98,16 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info)
|
|||
// TODO(yunikkk): Should we pass localized strings here and in other methods as byte arrays?
|
||||
if (info.IsMyPosition())
|
||||
return CreateMapObject(env, kMyPosition, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon,
|
||||
address.FormatAddress(), {}, "", info.HasBanner(),
|
||||
info.GetBannerTitleId(), info.GetBannerMessageId(),
|
||||
info.GetBannerIconId(), info.GetBannerUrl(), info.IsReachableByTaxi());
|
||||
address.FormatAddress(), {}, "", jbanner, info.IsReachableByTaxi());
|
||||
|
||||
if (info.HasApiUrl())
|
||||
return CreateMapObject(env, kApiPoint, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon,
|
||||
address.FormatAddress(), info.GetMetadata(), info.GetApiUrl(),
|
||||
info.HasBanner(), info.GetBannerTitleId(), info.GetBannerMessageId(),
|
||||
info.GetBannerIconId(), info.GetBannerUrl(), info.IsReachableByTaxi());
|
||||
jbanner, info.IsReachableByTaxi());
|
||||
|
||||
return CreateMapObject(env, kPoi, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon,
|
||||
address.FormatAddress(),
|
||||
info.IsFeature() ? info.GetMetadata() : Metadata(), "", info.HasBanner(),
|
||||
info.GetBannerTitleId(), info.GetBannerMessageId(), info.GetBannerIconId(),
|
||||
info.GetBannerUrl(), info.IsReachableByTaxi());
|
||||
info.IsFeature() ? info.GetMetadata() : Metadata(), "", jbanner,
|
||||
info.IsReachableByTaxi());
|
||||
}
|
||||
} // namespace usermark_helper
|
||||
|
|
|
@ -973,10 +973,10 @@
|
|||
<string name="booking_filters_rating_very_good">جيد جداً</string>
|
||||
<string name="booking_filters_rating_excellent">ممتاز</string>
|
||||
<string name="booking_filters_price_category">فئة الأسعار</string>
|
||||
<string name="booking_filters_no_results">لم يتم العثور على نتائج</string>
|
||||
<string name="booking_filters_nores_message">جرب مصطلح بحث أكثر عمومية أو التصغير أو إعادة تعيين عامل التصفية.</string>
|
||||
<string name="booking_filters_expand_area_button">تصغير</string>
|
||||
<string name="booking_filters_reset_button">إعادة تعيين عامل التصفية</string>
|
||||
<string name="search_no_results_title">لم يتم العثور على نتائج</string>
|
||||
<string name="search_no_results_message">جرب مصطلح بحث أكثر عمومية أو التصغير أو إعادة تعيين عامل التصفية.</string>
|
||||
<string name="search_no_results_expand_area_button">تصغير</string>
|
||||
<string name="search_no_results_reset_button">إعادة تعيين عامل التصفية</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">قائمة</string>
|
||||
<string name="booking_based_on_reviews">استناداً إلى %d من مراجعات الفنادق</string>
|
||||
|
|
|
@ -974,10 +974,10 @@
|
|||
<string name="booking_filters_rating_very_good">Velmi dobré</string>
|
||||
<string name="booking_filters_rating_excellent">Vynikající</string>
|
||||
<string name="booking_filters_price_category">Cenová kategorie</string>
|
||||
<string name="booking_filters_no_results">Nebyly nalezeny žádné výsledky</string>
|
||||
<string name="booking_filters_nores_message">Zkuste obecnější hledaný výraz, oddálit nebo obnovit filtr.</string>
|
||||
<string name="booking_filters_expand_area_button">Oddálit</string>
|
||||
<string name="booking_filters_reset_button">Resetovat filtr</string>
|
||||
<string name="search_no_results_title">Nebyly nalezeny žádné výsledky</string>
|
||||
<string name="search_no_results_message">Zkuste obecnější hledaný výraz, oddálit nebo obnovit filtr.</string>
|
||||
<string name="search_no_results_expand_area_button">Oddálit</string>
|
||||
<string name="search_no_results_reset_button">Resetovat filtr</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Seznam</string>
|
||||
<string name="booking_based_on_reviews">Podle %d hodnocení hotelů</string>
|
||||
|
|
|
@ -971,10 +971,10 @@
|
|||
<string name="booking_filters_rating_very_good">Meget god</string>
|
||||
<string name="booking_filters_rating_excellent">Fremragende</string>
|
||||
<string name="booking_filters_price_category">Prisklasse</string>
|
||||
<string name="booking_filters_no_results">Ingen resultater fundet</string>
|
||||
<string name="booking_filters_nores_message">Prøv et mere generelt søgeudtryk, zoom ud eller nulstil filteret.</string>
|
||||
<string name="booking_filters_expand_area_button">Zoom ud</string>
|
||||
<string name="booking_filters_reset_button">Nulstil Filter</string>
|
||||
<string name="search_no_results_title">Ingen resultater fundet</string>
|
||||
<string name="search_no_results_message">Prøv et mere generelt søgeudtryk, zoom ud eller nulstil filteret.</string>
|
||||
<string name="search_no_results_expand_area_button">Zoom ud</string>
|
||||
<string name="search_no_results_reset_button">Nulstil Filter</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Liste</string>
|
||||
<string name="booking_based_on_reviews">Baseret på %d hotelanmeldelser</string>
|
||||
|
|
|
@ -985,10 +985,10 @@
|
|||
<string name="booking_filters_rating_very_good">Sehr gut</string>
|
||||
<string name="booking_filters_rating_excellent">Ausgezeichnet</string>
|
||||
<string name="booking_filters_price_category">Preiskategorie</string>
|
||||
<string name="booking_filters_no_results">Keine Ergebnisse gefunden</string>
|
||||
<string name="booking_filters_nores_message">Versuchen Sie es mit einem allgemeineren Suchbegriff, zoomen Sie heraus oder setzen Sie den Filter zurück.</string>
|
||||
<string name="booking_filters_expand_area_button">Herauszoomen</string>
|
||||
<string name="booking_filters_reset_button">Filter zurücksetzen</string>
|
||||
<string name="search_no_results_title">Keine Ergebnisse gefunden</string>
|
||||
<string name="search_no_results_message">Versuchen Sie es mit einem allgemeineren Suchbegriff, zoomen Sie heraus oder setzen Sie den Filter zurück.</string>
|
||||
<string name="search_no_results_expand_area_button">Herauszoomen</string>
|
||||
<string name="search_no_results_reset_button">Filter zurücksetzen</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Liste</string>
|
||||
<string name="booking_based_on_reviews">Basierend auf %d Hotelbewertungen</string>
|
||||
|
|
|
@ -960,10 +960,10 @@
|
|||
<string name="booking_filters_rating_very_good">Muy bueno</string>
|
||||
<string name="booking_filters_rating_excellent">Excelente</string>
|
||||
<string name="booking_filters_price_category">Categoría de precios</string>
|
||||
<string name="booking_filters_no_results">No se han encontrado resultados</string>
|
||||
<string name="booking_filters_nores_message">Pruebe un término de búsqueda general, aléjese o restablezca el filtro.</string>
|
||||
<string name="booking_filters_expand_area_button">Alejarse</string>
|
||||
<string name="booking_filters_reset_button">Restablecer filtro</string>
|
||||
<string name="search_no_results_title">No se han encontrado resultados</string>
|
||||
<string name="search_no_results_message">Pruebe un término de búsqueda general, aléjese o restablezca el filtro.</string>
|
||||
<string name="search_no_results_expand_area_button">Alejarse</string>
|
||||
<string name="search_no_results_reset_button">Restablecer filtro</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lista</string>
|
||||
<string name="booking_based_on_reviews">Basado en %d reseñas de hoteles</string>
|
||||
|
@ -1007,8 +1007,8 @@
|
|||
<string name="banner_geerbest_message">Búsqueda instantánea de más de 50 000 artículos a precios bajos.</string>
|
||||
<string name="banner_rentalcars_title">Alquiler de coches en línea</string>
|
||||
<string name="banner_rentalcars_message">800 compañías de alquiler de coches en más de 49 000 localidades.</string>
|
||||
<string name="banner_viator_title">Reserva de viajes en línea</string>
|
||||
<string name="banner_viator_message">Más de 50 000 viajes por todo el mundo.</string>
|
||||
<string name="banner_viator_title">Reserva de visitas guiadas en línea</string>
|
||||
<string name="banner_viator_message">Más de 50 000 visitas guiadas por todo el mundo.</string>
|
||||
<!-- december -->
|
||||
<string name="whatsnew_traffic">Datos del tráfico en 36 países</string>
|
||||
<!-- december -->
|
||||
|
|
|
@ -967,10 +967,10 @@
|
|||
<string name="booking_filters_rating_very_good">Todella hyvä</string>
|
||||
<string name="booking_filters_rating_excellent">Erinomainen</string>
|
||||
<string name="booking_filters_price_category">Hintaluokka</string>
|
||||
<string name="booking_filters_no_results">Ei hakutuloksia</string>
|
||||
<string name="booking_filters_nores_message">Kokeile yleisempää hakusanaa, loitonna tai palauta suodatin.</string>
|
||||
<string name="booking_filters_expand_area_button">Loitonna</string>
|
||||
<string name="booking_filters_reset_button">Palauta suodatin</string>
|
||||
<string name="search_no_results_title">Ei hakutuloksia</string>
|
||||
<string name="search_no_results_message">Kokeile yleisempää hakusanaa, loitonna tai palauta suodatin.</string>
|
||||
<string name="search_no_results_expand_area_button">Loitonna</string>
|
||||
<string name="search_no_results_reset_button">Palauta suodatin</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Luettelo</string>
|
||||
<string name="booking_based_on_reviews">Perustuu %d hotelliarvioon</string>
|
||||
|
|
|
@ -984,10 +984,10 @@
|
|||
<string name="booking_filters_rating_very_good">Très bon</string>
|
||||
<string name="booking_filters_rating_excellent">Excellent</string>
|
||||
<string name="booking_filters_price_category">Catégorie de prix</string>
|
||||
<string name="booking_filters_no_results">Aucun résultat trouvé</string>
|
||||
<string name="booking_filters_nores_message">Essayez un terme de recherche plus général , effectuez un zoom arrière ou réinitialisez le filtre.</string>
|
||||
<string name="booking_filters_expand_area_button">Zoom arrière</string>
|
||||
<string name="booking_filters_reset_button">Réinitialiser le filtre</string>
|
||||
<string name="search_no_results_title">Aucun résultat trouvé</string>
|
||||
<string name="search_no_results_message">Essayez un terme de recherche plus général , effectuez un zoom arrière ou réinitialisez le filtre.</string>
|
||||
<string name="search_no_results_expand_area_button">Zoom arrière</string>
|
||||
<string name="search_no_results_reset_button">Réinitialiser le filtre</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Liste</string>
|
||||
<string name="booking_based_on_reviews">Basé sur %d revues d\'hôtels</string>
|
||||
|
|
|
@ -967,10 +967,10 @@
|
|||
<string name="booking_filters_rating_very_good">Nagyon jó</string>
|
||||
<string name="booking_filters_rating_excellent">Kiváló</string>
|
||||
<string name="booking_filters_price_category">Árkategória</string>
|
||||
<string name="booking_filters_no_results">Nincs találat</string>
|
||||
<string name="booking_filters_nores_message">Próbálkozzon általánosabb kereső kifejezéssel, tágítsa vagy törölje a szűrőt.</string>
|
||||
<string name="booking_filters_expand_area_button">Kicsinyítés</string>
|
||||
<string name="booking_filters_reset_button">Szűrő nullázása</string>
|
||||
<string name="search_no_results_title">Nincs találat</string>
|
||||
<string name="search_no_results_message">Próbálkozzon általánosabb kereső kifejezéssel, tágítsa vagy törölje a szűrőt.</string>
|
||||
<string name="search_no_results_expand_area_button">Kicsinyítés</string>
|
||||
<string name="search_no_results_reset_button">Szűrő nullázása</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lista</string>
|
||||
<string name="booking_based_on_reviews">%d hotel-értékelés alapján</string>
|
||||
|
|
|
@ -966,10 +966,10 @@
|
|||
<string name="booking_filters_rating_very_good">Sangat Bagus</string>
|
||||
<string name="booking_filters_rating_excellent">Luar Biasa</string>
|
||||
<string name="booking_filters_price_category">Kategori Harga</string>
|
||||
<string name="booking_filters_no_results">Tidak Ada Hasil</string>
|
||||
<string name="booking_filters_nores_message">Cobalah dengan istilah pencarian yang lebih umum, perkecil atau atur ulang filter.</string>
|
||||
<string name="booking_filters_expand_area_button">Perkecil</string>
|
||||
<string name="booking_filters_reset_button">Atur Ulang Filter</string>
|
||||
<string name="search_no_results_title">Tidak Ada Hasil</string>
|
||||
<string name="search_no_results_message">Cobalah dengan istilah pencarian yang lebih umum, perkecil atau atur ulang filter.</string>
|
||||
<string name="search_no_results_expand_area_button">Perkecil</string>
|
||||
<string name="search_no_results_reset_button">Atur Ulang Filter</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Daftar</string>
|
||||
<string name="booking_based_on_reviews">Berdasarkan %d ulasan hotel</string>
|
||||
|
|
|
@ -966,10 +966,10 @@
|
|||
<string name="booking_filters_rating_very_good">Molto buono</string>
|
||||
<string name="booking_filters_rating_excellent">Eccellente</string>
|
||||
<string name="booking_filters_price_category">Categoria di prezzo</string>
|
||||
<string name="booking_filters_no_results">Nessun risultato trovato</string>
|
||||
<string name="booking_filters_nores_message">Prova con un termine di ricerca più generale, fai lo zoom indietro o reimposta il filtro.</string>
|
||||
<string name="booking_filters_expand_area_button">Zoom indietro</string>
|
||||
<string name="booking_filters_reset_button">Reimposta filtro</string>
|
||||
<string name="search_no_results_title">Nessun risultato trovato</string>
|
||||
<string name="search_no_results_message">Prova con un termine di ricerca più generale, fai lo zoom indietro o reimposta il filtro.</string>
|
||||
<string name="search_no_results_expand_area_button">Zoom indietro</string>
|
||||
<string name="search_no_results_reset_button">Reimposta filtro</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Elenco</string>
|
||||
<string name="booking_based_on_reviews">Basato su %d recensioni d\'hotel</string>
|
||||
|
|
|
@ -966,10 +966,10 @@
|
|||
<string name="booking_filters_rating_very_good">非常に良い</string>
|
||||
<string name="booking_filters_rating_excellent">最高</string>
|
||||
<string name="booking_filters_price_category">価格帯</string>
|
||||
<string name="booking_filters_no_results">結果が見つかりません</string>
|
||||
<string name="booking_filters_nores_message">一般的な検索語句や、フィルター範囲を広げたりリセットしたりしてください。</string>
|
||||
<string name="booking_filters_expand_area_button">広げる</string>
|
||||
<string name="booking_filters_reset_button">フィルターをリセット</string>
|
||||
<string name="search_no_results_title">結果が見つかりません</string>
|
||||
<string name="search_no_results_message">一般的な検索語句や、フィルター範囲を広げたりリセットしたりしてください。</string>
|
||||
<string name="search_no_results_expand_area_button">広げる</string>
|
||||
<string name="search_no_results_reset_button">フィルターをリセット</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">一覧</string>
|
||||
<string name="booking_based_on_reviews">%d 件のホテルのレビューに基づいています</string>
|
||||
|
|
|
@ -963,10 +963,10 @@
|
|||
<string name="booking_filters_rating_very_good">매우 양호</string>
|
||||
<string name="booking_filters_rating_excellent">탁월</string>
|
||||
<string name="booking_filters_price_category">가격 범주</string>
|
||||
<string name="booking_filters_no_results">결과 찾지 못함</string>
|
||||
<string name="booking_filters_nores_message">보다 일반적인 검색어로 시도하거나, 축소하거나, 필터를 재설정하세요.</string>
|
||||
<string name="booking_filters_expand_area_button">축소</string>
|
||||
<string name="booking_filters_reset_button">필터 재설정</string>
|
||||
<string name="search_no_results_title">결과 찾지 못함</string>
|
||||
<string name="search_no_results_message">보다 일반적인 검색어로 시도하거나, 축소하거나, 필터를 재설정하세요.</string>
|
||||
<string name="search_no_results_expand_area_button">축소</string>
|
||||
<string name="search_no_results_reset_button">필터 재설정</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">목록</string>
|
||||
<string name="booking_based_on_reviews">%d개 호텔 리뷰 기반</string>
|
||||
|
|
|
@ -965,10 +965,10 @@
|
|||
<string name="booking_filters_rating_very_good">Veldig bra</string>
|
||||
<string name="booking_filters_rating_excellent">Utmerket</string>
|
||||
<string name="booking_filters_price_category">Prisklasse</string>
|
||||
<string name="booking_filters_no_results">Fant ingen resultater</string>
|
||||
<string name="booking_filters_nores_message">Prøv et mer generelt søkeord, zoom ut eller tilbakestill filteret.</string>
|
||||
<string name="booking_filters_expand_area_button">Zoom ut</string>
|
||||
<string name="booking_filters_reset_button">Tilbakestill filter</string>
|
||||
<string name="search_no_results_title">Fant ingen resultater</string>
|
||||
<string name="search_no_results_message">Prøv et mer generelt søkeord, zoom ut eller tilbakestill filteret.</string>
|
||||
<string name="search_no_results_expand_area_button">Zoom ut</string>
|
||||
<string name="search_no_results_reset_button">Tilbakestill filter</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Liste</string>
|
||||
<string name="booking_based_on_reviews">Basert på %d hotellvurderinger</string>
|
||||
|
@ -1012,7 +1012,7 @@
|
|||
<string name="banner_geerbest_message">Hurtigsøk blant over 50 000 varer til lave priser.</string>
|
||||
<string name="banner_rentalcars_title">Leie av bil online</string>
|
||||
<string name="banner_rentalcars_message">800 leiebilfirmaer på over 49 000 steder.</string>
|
||||
<string name="banner_viator_title">Αναζήτηση οργανωμένων εκδρομών online</string>
|
||||
<string name="banner_viator_title">Søk etter omvisninger med guide online</string>
|
||||
<string name="banner_viator_message">Søk blant over 50 000 omvisninger verden over.</string>
|
||||
<!-- december -->
|
||||
<string name="whatsnew_traffic">Trafikkdata i 36 land</string>
|
||||
|
|
|
@ -967,10 +967,10 @@
|
|||
<string name="booking_filters_rating_very_good">Heel Goed</string>
|
||||
<string name="booking_filters_rating_excellent">Uitstekend</string>
|
||||
<string name="booking_filters_price_category">Prijscategorie</string>
|
||||
<string name="booking_filters_no_results">Geen Resultaten Gevonden</string>
|
||||
<string name="booking_filters_nores_message">Probeer een meer algemene zoekterm, zoom uit of reset de filter.</string>
|
||||
<string name="booking_filters_expand_area_button">Uitzoomen</string>
|
||||
<string name="booking_filters_reset_button">Filter Resetten</string>
|
||||
<string name="search_no_results_title">Geen Resultaten Gevonden</string>
|
||||
<string name="search_no_results_message">Probeer een meer algemene zoekterm, zoom uit of reset de filter.</string>
|
||||
<string name="search_no_results_expand_area_button">Uitzoomen</string>
|
||||
<string name="search_no_results_reset_button">Filter Resetten</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lijst</string>
|
||||
<string name="booking_based_on_reviews">Gebaseerd op %d hotelbeoordelingen</string>
|
||||
|
|
|
@ -974,10 +974,10 @@
|
|||
<string name="booking_filters_rating_very_good">Bardzo dobrze</string>
|
||||
<string name="booking_filters_rating_excellent">Doskonale</string>
|
||||
<string name="booking_filters_price_category">Kategoria cenowa</string>
|
||||
<string name="booking_filters_no_results">Nie znaleziono wyników</string>
|
||||
<string name="booking_filters_nores_message">Spróbuj szerszego terminu wyszukiwania, zawęzić lub resetować filtr.</string>
|
||||
<string name="booking_filters_expand_area_button">Zawęź</string>
|
||||
<string name="booking_filters_reset_button">Resetuj filtr</string>
|
||||
<string name="search_no_results_title">Nie znaleziono wyników</string>
|
||||
<string name="search_no_results_message">Spróbuj szerszego terminu wyszukiwania, zawęzić lub resetować filtr.</string>
|
||||
<string name="search_no_results_expand_area_button">Zawęź</string>
|
||||
<string name="search_no_results_reset_button">Resetuj filtr</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lista</string>
|
||||
<string name="booking_based_on_reviews">Na podstawie %d opinii o hotelach</string>
|
||||
|
|
|
@ -966,10 +966,10 @@
|
|||
<string name="booking_filters_rating_very_good">Muito bom</string>
|
||||
<string name="booking_filters_rating_excellent">Excelente</string>
|
||||
<string name="booking_filters_price_category">Categoria de preços</string>
|
||||
<string name="booking_filters_no_results">Nenhum resultado encontrado</string>
|
||||
<string name="booking_filters_nores_message">Tente um termo de pesquisa mais geral, diminuir o zoom ou redefinir o filtro.</string>
|
||||
<string name="booking_filters_expand_area_button">Diminuir o zoom</string>
|
||||
<string name="booking_filters_reset_button">Redefinir o filtro</string>
|
||||
<string name="search_no_results_title">Nenhum resultado encontrado</string>
|
||||
<string name="search_no_results_message">Tente um termo de pesquisa mais geral, diminuir o zoom ou redefinir o filtro.</string>
|
||||
<string name="search_no_results_expand_area_button">Diminuir o zoom</string>
|
||||
<string name="search_no_results_reset_button">Redefinir o filtro</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lista</string>
|
||||
<string name="booking_based_on_reviews">Com base em %d análises de hotel</string>
|
||||
|
|
|
@ -963,10 +963,10 @@
|
|||
<string name="booking_filters_rating_very_good">Foarte bine</string>
|
||||
<string name="booking_filters_rating_excellent">Excelent</string>
|
||||
<string name="booking_filters_price_category">Categorie de preț</string>
|
||||
<string name="booking_filters_no_results">Nu au fost găsite rezultate</string>
|
||||
<string name="booking_filters_nores_message">Încercați un termen mai general, micșorați sau resetați filtrul.</string>
|
||||
<string name="booking_filters_expand_area_button">Micșorare</string>
|
||||
<string name="booking_filters_reset_button">Resetare filtru</string>
|
||||
<string name="search_no_results_title">Nu au fost găsite rezultate</string>
|
||||
<string name="search_no_results_message">Încercați un termen mai general, micșorați sau resetați filtrul.</string>
|
||||
<string name="search_no_results_expand_area_button">Micșorare</string>
|
||||
<string name="search_no_results_reset_button">Resetare filtru</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Listă</string>
|
||||
<string name="booking_based_on_reviews">Bazat pe comentariile privind hotelul %d</string>
|
||||
|
|
|
@ -986,10 +986,10 @@
|
|||
<string name="booking_filters_rating_very_good">Очень хорошо</string>
|
||||
<string name="booking_filters_rating_excellent">Отлично</string>
|
||||
<string name="booking_filters_price_category">Ценовая категория</string>
|
||||
<string name="booking_filters_no_results">Поиск не дал результатов</string>
|
||||
<string name="booking_filters_nores_message">Попробуйте задать более общий запрос, уменьшить масштаб карты или сбросить фильтр.</string>
|
||||
<string name="booking_filters_expand_area_button">Уменьшить масштаб карты</string>
|
||||
<string name="booking_filters_reset_button">Сбросить фильтр</string>
|
||||
<string name="search_no_results_title">Поиск не дал результатов</string>
|
||||
<string name="search_no_results_message">Попробуйте задать более общий запрос, уменьшить масштаб карты или сбросить фильтр.</string>
|
||||
<string name="search_no_results_expand_area_button">Уменьшить масштаб карты</string>
|
||||
<string name="search_no_results_reset_button">Сбросить фильтр</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Список</string>
|
||||
<string name="booking_based_on_reviews">По %d отзывам об отеле</string>
|
||||
|
|
|
@ -970,10 +970,10 @@
|
|||
<string name="booking_filters_rating_very_good">Veľmi dobré</string>
|
||||
<string name="booking_filters_rating_excellent">Výborné</string>
|
||||
<string name="booking_filters_price_category">Cenová kategória</string>
|
||||
<string name="booking_filters_no_results">Nenašli sa žiadne výsledky</string>
|
||||
<string name="booking_filters_nores_message">Skúste vyhľadávať všeobecnejší výraz, vzdialiť alebo obnoviť nastavenie filtra.</string>
|
||||
<string name="booking_filters_expand_area_button">Vzdialiť</string>
|
||||
<string name="booking_filters_reset_button">Obnoviť filter</string>
|
||||
<string name="search_no_results_title">Nenašli sa žiadne výsledky</string>
|
||||
<string name="search_no_results_message">Skúste vyhľadávať všeobecnejší výraz, vzdialiť alebo obnoviť nastavenie filtra.</string>
|
||||
<string name="search_no_results_expand_area_button">Vzdialiť</string>
|
||||
<string name="search_no_results_reset_button">Obnoviť filter</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Zoznam</string>
|
||||
<string name="booking_based_on_reviews">Na základe %d recenzií</string>
|
||||
|
|
|
@ -971,10 +971,10 @@
|
|||
<string name="booking_filters_rating_very_good">Väldigt bra</string>
|
||||
<string name="booking_filters_rating_excellent">Utmärkt</string>
|
||||
<string name="booking_filters_price_category">Priskategori</string>
|
||||
<string name="booking_filters_no_results">Inga resultat hittades</string>
|
||||
<string name="booking_filters_nores_message">Försök med en mer allmän sökterm, zooma ut eller återställ filtret.</string>
|
||||
<string name="booking_filters_expand_area_button">Zooma ut</string>
|
||||
<string name="booking_filters_reset_button">Återställ filtret</string>
|
||||
<string name="search_no_results_title">Inga resultat hittades</string>
|
||||
<string name="search_no_results_message">Försök med en mer allmän sökterm, zooma ut eller återställ filtret.</string>
|
||||
<string name="search_no_results_expand_area_button">Zooma ut</string>
|
||||
<string name="search_no_results_reset_button">Återställ filtret</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Lista</string>
|
||||
<string name="booking_based_on_reviews">Baserat på %d hotellomdömen</string>
|
||||
|
|
|
@ -973,10 +973,10 @@
|
|||
<string name="booking_filters_rating_very_good">ดีมาก</string>
|
||||
<string name="booking_filters_rating_excellent">ยอดเยี่ยม</string>
|
||||
<string name="booking_filters_price_category">หมวดหมู่ราคา</string>
|
||||
<string name="booking_filters_no_results">ไม่พบผลลัพธ์</string>
|
||||
<string name="booking_filters_nores_message">ลองค้นหาด้วยคำทั่ว ๆ ไปดู ซูมออกหรือรีเซ็ตตัวกรอง</string>
|
||||
<string name="booking_filters_expand_area_button">ซูมออก</string>
|
||||
<string name="booking_filters_reset_button">รีเซ็ตตัวกรอง</string>
|
||||
<string name="search_no_results_title">ไม่พบผลลัพธ์</string>
|
||||
<string name="search_no_results_message">ลองค้นหาด้วยคำทั่ว ๆ ไปดู ซูมออกหรือรีเซ็ตตัวกรอง</string>
|
||||
<string name="search_no_results_expand_area_button">ซูมออก</string>
|
||||
<string name="search_no_results_reset_button">รีเซ็ตตัวกรอง</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">รายการ</string>
|
||||
<string name="booking_based_on_reviews">ตาม %d รีวิวโรงแรม</string>
|
||||
|
|
|
@ -973,10 +973,10 @@
|
|||
<string name="booking_filters_rating_very_good">Çok iyi</string>
|
||||
<string name="booking_filters_rating_excellent">Mükemmel</string>
|
||||
<string name="booking_filters_price_category">Fiyat Kategorisi</string>
|
||||
<string name="booking_filters_no_results">Hiçbir Sonuç Bulunamadı</string>
|
||||
<string name="booking_filters_nores_message">Daha genel bir terimi aramayı deneyin, uzaklaşın veya filtreyi Sıfırlayın.</string>
|
||||
<string name="booking_filters_expand_area_button">Uzaklaş</string>
|
||||
<string name="booking_filters_reset_button">Filtreyi Sıfırla</string>
|
||||
<string name="search_no_results_title">Hiçbir Sonuç Bulunamadı</string>
|
||||
<string name="search_no_results_message">Daha genel bir terimi aramayı deneyin, uzaklaşın veya filtreyi Sıfırlayın.</string>
|
||||
<string name="search_no_results_expand_area_button">Uzaklaş</string>
|
||||
<string name="search_no_results_reset_button">Filtreyi Sıfırla</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Liste</string>
|
||||
<string name="booking_based_on_reviews">%d otel değerlendirmesine göre</string>
|
||||
|
|
|
@ -971,10 +971,10 @@
|
|||
<string name="booking_filters_rating_very_good">Дуже добре</string>
|
||||
<string name="booking_filters_rating_excellent">Чудово</string>
|
||||
<string name="booking_filters_price_category">Цінова категорія</string>
|
||||
<string name="booking_filters_no_results">Не знайдено жодного результату</string>
|
||||
<string name="booking_filters_nores_message">Спробуйте пошук за більш узагальненим пошуковим виразом, зменшіть масштаб або скиньте фільтри.</string>
|
||||
<string name="booking_filters_expand_area_button">Зменшити масштаб</string>
|
||||
<string name="booking_filters_reset_button">Скинути фільтри</string>
|
||||
<string name="search_no_results_title">Не знайдено жодного результату</string>
|
||||
<string name="search_no_results_message">Спробуйте пошук за більш узагальненим пошуковим виразом, зменшіть масштаб або скиньте фільтри.</string>
|
||||
<string name="search_no_results_expand_area_button">Зменшити масштаб</string>
|
||||
<string name="search_no_results_reset_button">Скинути фільтри</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Список</string>
|
||||
<string name="booking_based_on_reviews">На основі %d відгуків(-у) про готель</string>
|
||||
|
|
|
@ -967,10 +967,10 @@
|
|||
<string name="booking_filters_rating_very_good">Rất tốt</string>
|
||||
<string name="booking_filters_rating_excellent">Xuất sắc</string>
|
||||
<string name="booking_filters_price_category">Hạng mục Giá</string>
|
||||
<string name="booking_filters_no_results">Không tìm thấy kết quả nào</string>
|
||||
<string name="booking_filters_nores_message">Hãy thử một từ khóa tìm kiếm chung hơn, thu nhỏ hoặc đặt lại bộ lọc.</string>
|
||||
<string name="booking_filters_expand_area_button">Thu nhỏ</string>
|
||||
<string name="booking_filters_reset_button">Đặt lại Bộ lọc</string>
|
||||
<string name="search_no_results_title">Không tìm thấy kết quả nào</string>
|
||||
<string name="search_no_results_message">Hãy thử một từ khóa tìm kiếm chung hơn, thu nhỏ hoặc đặt lại bộ lọc.</string>
|
||||
<string name="search_no_results_expand_area_button">Thu nhỏ</string>
|
||||
<string name="search_no_results_reset_button">Đặt lại Bộ lọc</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">Danh sách</string>
|
||||
<string name="booking_based_on_reviews">Dựa trên %d đánh giá khách sạn</string>
|
||||
|
|
|
@ -979,10 +979,10 @@
|
|||
<string name="booking_filters_rating_very_good">很好</string>
|
||||
<string name="booking_filters_rating_excellent">極好</string>
|
||||
<string name="booking_filters_price_category">價格類別</string>
|
||||
<string name="booking_filters_no_results">找不到任何結果</string>
|
||||
<string name="booking_filters_nores_message">嘗試一個更普通的搜尋字詞、縮小顯示或重設篩選條件。</string>
|
||||
<string name="booking_filters_expand_area_button">縮小</string>
|
||||
<string name="booking_filters_reset_button">重設篩選條件</string>
|
||||
<string name="search_no_results_title">找不到任何結果</string>
|
||||
<string name="search_no_results_message">嘗試一個更普通的搜尋字詞、縮小顯示或重設篩選條件。</string>
|
||||
<string name="search_no_results_expand_area_button">縮小</string>
|
||||
<string name="search_no_results_reset_button">重設篩選條件</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">清單</string>
|
||||
<string name="booking_based_on_reviews">根據 %d 則飯店評論</string>
|
||||
|
|
|
@ -973,10 +973,10 @@
|
|||
<string name="booking_filters_rating_very_good">很好</string>
|
||||
<string name="booking_filters_rating_excellent">极好</string>
|
||||
<string name="booking_filters_price_category">价格类别</string>
|
||||
<string name="booking_filters_no_results">未找到任何结果</string>
|
||||
<string name="booking_filters_nores_message">尝试一个更普通的搜索词、缩小显示或重置筛选器。</string>
|
||||
<string name="booking_filters_expand_area_button">缩小</string>
|
||||
<string name="booking_filters_reset_button">重置筛选器</string>
|
||||
<string name="search_no_results_title">未找到任何结果</string>
|
||||
<string name="search_no_results_message">尝试一个更普通的搜索词、缩小显示或重置筛选器。</string>
|
||||
<string name="search_no_results_expand_area_button">缩小</string>
|
||||
<string name="search_no_results_reset_button">重置筛选器</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">列表</string>
|
||||
<string name="booking_based_on_reviews">根据 %d 条酒店点评</string>
|
||||
|
|
|
@ -975,7 +975,7 @@
|
|||
<!-- For place page hotel nearby block -->
|
||||
<string name="placepage_hotel_nearby">Nearby</string>
|
||||
<!-- For ordering a taxi (as opposed to hotels or other things) -->
|
||||
<string name="taxi_order">Order Taxi</string>
|
||||
<string name="taxi_order">Order a taxi</string>
|
||||
<!-- How long it is until the taxi arrives -->
|
||||
<string name="taxi_wait">Expected in %s</string>
|
||||
<!-- When there are no available taxis nearby -->
|
||||
|
@ -990,10 +990,10 @@
|
|||
<string name="booking_filters_rating_very_good">Very Good</string>
|
||||
<string name="booking_filters_rating_excellent">Excellent</string>
|
||||
<string name="booking_filters_price_category">Price Category</string>
|
||||
<string name="booking_filters_no_results">No Results Found</string>
|
||||
<string name="booking_filters_nores_message">Try a more general search term, zoom out or reset the filter.</string>
|
||||
<string name="booking_filters_expand_area_button">Zoom out</string>
|
||||
<string name="booking_filters_reset_button">Reset Filter</string>
|
||||
<string name="search_no_results_title">No Results Found</string>
|
||||
<string name="search_no_results_message">Try a more general search term, zoom out or reset the filter.</string>
|
||||
<string name="search_no_results_expand_area_button">Zoom out</string>
|
||||
<string name="search_no_results_reset_button">Reset Filter</string>
|
||||
<!-- noun -->
|
||||
<string name="search_in_table">List</string>
|
||||
<string name="booking_based_on_reviews">Based on %d hotel reviews</string>
|
||||
|
@ -1048,7 +1048,7 @@
|
|||
<!-- december -->
|
||||
<string name="whatsnew_traffic_roaming_text">Requires less than 1 MB of mobile bandwidth per trip.</string>
|
||||
<!-- december -->
|
||||
<string name="whatsnew_order_taxi">Order a Taxi</string>
|
||||
<string name="whatsnew_order_taxi">Order Taxi</string>
|
||||
<!-- december -->
|
||||
<string name="whatsnew_order_taxi_text">Most of the location pages now contain a button for ordering a taxi.</string>
|
||||
<!-- january -->
|
||||
|
|
|
@ -867,6 +867,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
mOnmapDownloader.onResume();
|
||||
if (mNavigationController != null)
|
||||
mNavigationController.onResume();
|
||||
if (mNavAnimationController != null)
|
||||
mNavAnimationController.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,10 +30,16 @@ class NavigationButtonsAnimationController
|
|||
{
|
||||
mZoomIn = zoomIn;
|
||||
mZoomOut = zoomOut;
|
||||
checkZoomButtonsVisibility();
|
||||
mMyPosition = myPosition;
|
||||
calculateBottomLimit();
|
||||
}
|
||||
|
||||
private void checkZoomButtonsVisibility()
|
||||
{
|
||||
UiUtils.showIf(showZoomButtons(), mZoomIn, mZoomOut);
|
||||
}
|
||||
|
||||
void disappearZoomButtons()
|
||||
{
|
||||
if (!showZoomButtons())
|
||||
|
@ -252,4 +258,9 @@ class NavigationButtonsAnimationController
|
|||
{
|
||||
return Config.showZoomButtons();
|
||||
}
|
||||
|
||||
public void onResume()
|
||||
{
|
||||
checkZoomButtonsVisibility();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.support.annotation.Nullable;
|
|||
|
||||
public final class Banner implements Parcelable
|
||||
{
|
||||
public static final Banner EMPTY = new Banner("", "", "", "");
|
||||
public static final Banner EMPTY = new Banner(null, null, null, null, null, null);
|
||||
|
||||
public static final Creator<Banner> CREATOR = new Creator<Banner>()
|
||||
{
|
||||
|
@ -23,6 +23,8 @@ public final class Banner implements Parcelable
|
|||
}
|
||||
};
|
||||
|
||||
@Nullable
|
||||
private final String mId;
|
||||
@Nullable
|
||||
private final String mTitle;
|
||||
@Nullable
|
||||
|
@ -31,22 +33,34 @@ public final class Banner implements Parcelable
|
|||
private final String mIconUrl;
|
||||
@Nullable
|
||||
private final String mUrl;
|
||||
@Nullable
|
||||
private final String mTypes;
|
||||
|
||||
public Banner(@Nullable String title, @Nullable String message,
|
||||
@Nullable String iconUrl, @Nullable String url)
|
||||
public Banner(@Nullable String id, @Nullable String title, @Nullable String message,
|
||||
@Nullable String iconUrl, @Nullable String url, @Nullable String types)
|
||||
{
|
||||
mId = id;
|
||||
mTitle = title;
|
||||
mMessage = message;
|
||||
mIconUrl = iconUrl;
|
||||
mUrl = url;
|
||||
mTypes = types;
|
||||
}
|
||||
|
||||
protected Banner(Parcel in)
|
||||
{
|
||||
mId = in.readString();
|
||||
mTitle = in.readString();
|
||||
mMessage = in.readString();
|
||||
mIconUrl = in.readString();
|
||||
mUrl = in.readString();
|
||||
mTypes = in.readString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getId()
|
||||
{
|
||||
return mId;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -73,6 +87,12 @@ public final class Banner implements Parcelable
|
|||
return mUrl;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getTypes()
|
||||
{
|
||||
return mTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents()
|
||||
{
|
||||
|
@ -82,9 +102,24 @@ public final class Banner implements Parcelable
|
|||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags)
|
||||
{
|
||||
dest.writeString(mId);
|
||||
dest.writeString(mTitle);
|
||||
dest.writeString(mMessage);
|
||||
dest.writeString(mIconUrl);
|
||||
dest.writeString(mUrl);
|
||||
dest.writeString(mTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Banner{" +
|
||||
"mId='" + mId + '\'' +
|
||||
", mTitle='" + mTitle + '\'' +
|
||||
", mMessage='" + mMessage + '\'' +
|
||||
", mIconUrl='" + mIconUrl + '\'' +
|
||||
", mUrl='" + mUrl + '\'' +
|
||||
", mTypes='" + mTypes + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ public class NavigationController implements TrafficManager.TrafficCallback
|
|||
private final TextView mDistanceUnits;
|
||||
private final FlatProgressView mRouteProgress;
|
||||
|
||||
@NonNull
|
||||
private final SearchWheel mSearchWheel;
|
||||
|
||||
private boolean mShowTimeLeft = true;
|
||||
|
@ -306,11 +307,13 @@ public class NavigationController implements TrafficManager.TrafficCallback
|
|||
public void onSaveState(@NonNull Bundle outState)
|
||||
{
|
||||
outState.putBoolean(STATE_SHOW_TIME_LEFT, mShowTimeLeft);
|
||||
mSearchWheel.saveState(outState);
|
||||
}
|
||||
|
||||
public void onRestoreState(@NonNull Bundle savedInstanceState)
|
||||
{
|
||||
mShowTimeLeft = savedInstanceState.getBoolean(STATE_SHOW_TIME_LEFT);
|
||||
mSearchWheel.restoreState(savedInstanceState);
|
||||
}
|
||||
|
||||
public boolean cancel()
|
||||
|
|
|
@ -2,7 +2,9 @@ package com.mapswithme.maps.routing;
|
|||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorInflater;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.IdRes;
|
||||
import android.support.annotation.NonNull;
|
||||
|
@ -22,6 +24,7 @@ import com.mapswithme.util.concurrency.UiThread;
|
|||
|
||||
class SearchWheel implements View.OnClickListener
|
||||
{
|
||||
private static final String EXTRA_CURRENT_OPTION = "extra_current_option";
|
||||
private final View mFrame;
|
||||
|
||||
private final View mSearchLayout;
|
||||
|
@ -29,6 +32,7 @@ class SearchWheel implements View.OnClickListener
|
|||
private final View mTouchInterceptor;
|
||||
|
||||
private boolean mIsExpanded;
|
||||
@Nullable
|
||||
private SearchOption mCurrentOption;
|
||||
|
||||
private static final long CLOSE_DELAY_MILLIS = 5000L;
|
||||
|
@ -115,6 +119,16 @@ class SearchWheel implements View.OnClickListener
|
|||
refreshSearchVisibility();
|
||||
}
|
||||
|
||||
void saveState(@NonNull Bundle outState)
|
||||
{
|
||||
outState.putSerializable(EXTRA_CURRENT_OPTION, mCurrentOption);
|
||||
}
|
||||
|
||||
void restoreState(@NonNull Bundle savedState)
|
||||
{
|
||||
mCurrentOption = (SearchOption) savedState.getSerializable(EXTRA_CURRENT_OPTION);
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
mIsExpanded = false;
|
||||
|
@ -125,6 +139,12 @@ class SearchWheel implements View.OnClickListener
|
|||
|
||||
public void onResume()
|
||||
{
|
||||
if (mCurrentOption != null)
|
||||
{
|
||||
refreshSearchButtonImage();
|
||||
return;
|
||||
}
|
||||
|
||||
final String query = SearchEngine.getQuery();
|
||||
if (TextUtils.isEmpty(query))
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Intent;
|
|||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
|
@ -267,8 +268,9 @@ public class SearchFragment extends BaseMwmFragment
|
|||
tabAdapter.setTabSelectedListener(new TabAdapter.OnTabSelectedListener()
|
||||
{
|
||||
@Override
|
||||
public void onTabSelected(TabAdapter.Tab tab)
|
||||
public void onTabSelected(@NonNull TabAdapter.Tab tab)
|
||||
{
|
||||
Statistics.INSTANCE.trackSearchTabSelected(tab.name());
|
||||
mToolbarController.deactivate();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.mapswithme.maps.search;
|
|||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
|
@ -73,7 +74,7 @@ class TabAdapter extends FragmentPagerAdapter
|
|||
|
||||
interface OnTabSelectedListener
|
||||
{
|
||||
void onTabSelected(Tab tab);
|
||||
void onTabSelected(@NonNull Tab tab);
|
||||
}
|
||||
|
||||
// Workaround for https://code.google.com/p/android/issues/detail?id=180454
|
||||
|
|
|
@ -15,11 +15,13 @@ import com.bumptech.glide.Glide;
|
|||
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.mapswithme.maps.MwmApplication;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.bookmarks.data.Banner;
|
||||
import com.mapswithme.util.ConnectionState;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
import static com.mapswithme.util.SharedPropertiesUtils.isShowcaseSwitchedOnLocal;
|
||||
|
@ -54,7 +56,7 @@ final class BannerController implements View.OnClickListener
|
|||
@NonNull
|
||||
private final Resources mResources;
|
||||
|
||||
private boolean mIsOpened = false;
|
||||
private boolean mOpened = false;
|
||||
|
||||
@Nullable
|
||||
private ValueAnimator mIconAnimator;
|
||||
|
@ -62,6 +64,7 @@ final class BannerController implements View.OnClickListener
|
|||
BannerController(@NonNull View bannerView, @Nullable OnBannerClickListener listener)
|
||||
{
|
||||
mFrame = bannerView;
|
||||
mFrame.setOnClickListener(this);
|
||||
mListener = listener;
|
||||
mResources = mFrame.getResources();
|
||||
mCloseFrameHeight = mResources.getDimension(R.dimen.placepage_banner_height);
|
||||
|
@ -85,21 +88,41 @@ final class BannerController implements View.OnClickListener
|
|||
return;
|
||||
|
||||
loadIcon(banner);
|
||||
if (mTitle != null)
|
||||
{
|
||||
String title = mResources.getString(mResources.getIdentifier(banner.getTitle(), "string", mFrame.getContext().getPackageName()));
|
||||
if (!TextUtils.isEmpty(title))
|
||||
mTitle.setText(title);
|
||||
}
|
||||
if (mMessage != null)
|
||||
{
|
||||
String message = mResources.getString(mResources.getIdentifier(banner.getMessage(), "string", mFrame.getContext().getPackageName()));
|
||||
if (!TextUtils.isEmpty(message))
|
||||
mMessage.setText(message);
|
||||
}
|
||||
setLabelSafely(mTitle, mBanner.getTitle());
|
||||
setLabelSafely(mMessage, mBanner.getMessage());
|
||||
|
||||
if (UiUtils.isLandscape(mFrame.getContext()))
|
||||
open();
|
||||
else
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.PP_BANNER_SHOW,
|
||||
Statistics.params()
|
||||
.add("tags:", mBanner.getTypes())
|
||||
.add("banner:", mBanner.getId())
|
||||
.add("state:", "0"));
|
||||
}
|
||||
|
||||
private void setLabelSafely(@Nullable TextView label, @Nullable String labelId)
|
||||
{
|
||||
if (label == null)
|
||||
return;
|
||||
|
||||
if (TextUtils.isEmpty(labelId))
|
||||
{
|
||||
Crashlytics.logException(new Resources.NotFoundException("An empty string id obtained for: "
|
||||
+ mBanner));
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
String packageName = mFrame.getContext().getPackageName();
|
||||
String value = mResources.getString(mResources.getIdentifier(labelId, "string", packageName));
|
||||
label.setText(value);
|
||||
}
|
||||
catch (Resources.NotFoundException e)
|
||||
{
|
||||
Crashlytics.logException(new IllegalStateException("Unknown banner is found: " + mBanner, e));
|
||||
}
|
||||
}
|
||||
|
||||
boolean isShowing()
|
||||
|
@ -109,10 +132,10 @@ final class BannerController implements View.OnClickListener
|
|||
|
||||
void open()
|
||||
{
|
||||
if (!isShowing() || mBanner == null || mIsOpened)
|
||||
if (!isShowing() || mBanner == null || mOpened)
|
||||
return;
|
||||
|
||||
mIsOpened = true;
|
||||
mOpened = true;
|
||||
setFrameHeight(WRAP_CONTENT);
|
||||
setIconParams(mOpenIconSize, 0, mMarginBase, new Runnable()
|
||||
{
|
||||
|
@ -125,15 +148,20 @@ final class BannerController implements View.OnClickListener
|
|||
UiUtils.show(mMessage, mAdMarker);
|
||||
if (mTitle != null)
|
||||
mTitle.setMaxLines(2);
|
||||
mFrame.setOnClickListener(this);
|
||||
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.PP_BANNER_SHOW,
|
||||
Statistics.params()
|
||||
.add("tags:", mBanner.getTypes())
|
||||
.add("banner:", mBanner.getId())
|
||||
.add("state:", "1"));
|
||||
}
|
||||
|
||||
boolean close()
|
||||
{
|
||||
if (!isShowing() || mBanner == null || !mIsOpened)
|
||||
if (!isShowing() || mBanner == null || !mOpened)
|
||||
return false;
|
||||
|
||||
mIsOpened = false;
|
||||
mOpened = false;
|
||||
setFrameHeight((int) mCloseFrameHeight);
|
||||
setIconParams(mCloseIconSize, mMarginBase, mMarginHalfPlus, new Runnable()
|
||||
{
|
||||
|
@ -146,6 +174,7 @@ final class BannerController implements View.OnClickListener
|
|||
UiUtils.hide(mMessage, mAdMarker);
|
||||
if (mTitle != null)
|
||||
mTitle.setMaxLines(1);
|
||||
|
||||
mFrame.setOnClickListener(null);
|
||||
|
||||
return true;
|
||||
|
@ -254,8 +283,17 @@ final class BannerController implements View.OnClickListener
|
|||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
if (mListener != null && mBanner != null)
|
||||
if (mListener == null || mBanner == null)
|
||||
return;
|
||||
|
||||
if (mOpened)
|
||||
mListener.onBannerClick(mBanner);
|
||||
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.PP_BANNER_CLICK,
|
||||
Statistics.params()
|
||||
.add("tags:", mBanner.getTypes())
|
||||
.add("banner:", mBanner.getId())
|
||||
.add("state:", mOpened ? "1" : "0"));
|
||||
}
|
||||
|
||||
interface OnBannerClickListener
|
||||
|
|
|
@ -64,6 +64,7 @@ public enum Statistics
|
|||
public static final String SEARCH_ITEM_CLICKED = "Search. Key clicked";
|
||||
public static final String SEARCH_ON_MAP_CLICKED = "Search. View on map clicked.";
|
||||
public static final String SEARCH_CANCEL = "Search. Cancel.";
|
||||
public static final String SEARCH_TAB_SELECTED = "Search_Tab_selected";
|
||||
|
||||
// place page
|
||||
public static final String PP_OPEN = "PP. Open";
|
||||
|
@ -78,6 +79,8 @@ public enum Statistics
|
|||
public static final String PP_DIRECTION_ARROW = "PP. DirectionArrow";
|
||||
public static final String PP_DIRECTION_ARROW_CLOSE = "PP. DirectionArrowClose";
|
||||
public static final String PP_METADATA_COPY = "PP. CopyMetadata";
|
||||
public static final String PP_BANNER_CLICK = "Placepage_Banner_click";
|
||||
public static final String PP_BANNER_SHOW = "Placepage_Banner_show";
|
||||
|
||||
// toolbar actions
|
||||
public static final String TOOLBAR_MY_POSITION = "Toolbar. MyPosition";
|
||||
|
@ -181,6 +184,7 @@ public enum Statistics
|
|||
public static final String FROM = "from";
|
||||
public static final String TO = "to";
|
||||
public static final String CATEGORY = "category";
|
||||
public static final String TAB = "tab";
|
||||
public static final String COUNT = "Count";
|
||||
public static final String CHANNEL = "Channel";
|
||||
public static final String CALLER_ID = "Caller ID";
|
||||
|
@ -328,6 +332,11 @@ public enum Statistics
|
|||
params().add(EventParam.ENABLED, String.valueOf(isEnabled)));
|
||||
}
|
||||
|
||||
public void trackSearchTabSelected(@NonNull String tab)
|
||||
{
|
||||
trackEvent(EventName.SEARCH_TAB_SELECTED, params().add(EventParam.TAB, tab));
|
||||
}
|
||||
|
||||
public void trackSearchCategoryClicked(String category)
|
||||
{
|
||||
trackEvent(EventName.SEARCH_CAT_CLICKED, params().add(EventParam.CATEGORY, category));
|
||||
|
|
BIN
data/World.mwm
|
@ -47,3 +47,4 @@ end = 2017-01-15
|
|||
[raileurope]
|
||||
end = 2017-01-15
|
||||
url = http://www.anrdoezrs.net/links/8196243/type/dlg/fragment/%2Fptp_request/https://mobile.raileurope.com/app/index.html
|
||||
messages = banner_tutu
|
||||
|
|
2302
data/countries.txt
|
@ -1,6 +1,6 @@
|
|||
WorldCoasts.mwm 4635475
|
||||
WorldCoasts.mwm 4634539
|
||||
WorldCoasts_obsolete.mwm 4513802
|
||||
World.mwm 35554796
|
||||
World.mwm 35618370
|
||||
01_dejavusans.ttf 633604
|
||||
02_droidsans-fallback.ttf 4033420
|
||||
03_jomolhari-id-a3d.ttf 1817160
|
||||
|
|
Before Width: | Height: | Size: 681 KiB After Width: | Height: | Size: 682 KiB |
Before Width: | Height: | Size: 609 KiB After Width: | Height: | Size: 600 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 318 KiB |
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 284 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 205 KiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 480 KiB After Width: | Height: | Size: 476 KiB |
Before Width: | Height: | Size: 432 KiB After Width: | Height: | Size: 425 KiB |
Before Width: | Height: | Size: 720 KiB After Width: | Height: | Size: 725 KiB |
Before Width: | Height: | Size: 643 KiB After Width: | Height: | Size: 631 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -96,8 +96,6 @@ void DebugRectRenderer::DrawRect(ScreenBase const & screen, m2::RectF const & re
|
|||
GLFunctions::glBindBuffer(m_vertexBuffer, gl_const::GLArrayBuffer);
|
||||
GLFunctions::glBindVertexArray(m_VAO);
|
||||
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
|
||||
array<m2::PointF, 5> vertices;
|
||||
vertices[0] = PixelPointToScreenSpace(screen, rect.LeftBottom());
|
||||
vertices[1] = PixelPointToScreenSpace(screen, rect.LeftTop());
|
||||
|
@ -114,8 +112,6 @@ void DebugRectRenderer::DrawRect(ScreenBase const & screen, m2::RectF const & re
|
|||
|
||||
GLFunctions::glDrawArrays(gl_const::GLLineStrip, 0, vertices.size());
|
||||
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
|
||||
GLFunctions::glBindBuffer(0, gl_const::GLArrayBuffer);
|
||||
GLFunctions::glBindVertexArray(0);
|
||||
|
||||
|
@ -138,8 +134,6 @@ void DebugRectRenderer::DrawArrow(ScreenBase const & screen, OverlayTree::Displa
|
|||
GLFunctions::glBindBuffer(m_vertexBuffer, gl_const::GLArrayBuffer);
|
||||
GLFunctions::glBindVertexArray(m_VAO);
|
||||
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
|
||||
array<m2::PointF, 5> vertices;
|
||||
m2::PointF const dir = (data.m_arrowEnd - data.m_arrowStart).Normalize();
|
||||
m2::PointF const side = m2::PointF(-dir.y, dir.x);
|
||||
|
@ -159,8 +153,6 @@ void DebugRectRenderer::DrawArrow(ScreenBase const & screen, OverlayTree::Displa
|
|||
|
||||
GLFunctions::glDrawArrays(gl_const::GLLineStrip, 0, vertices.size());
|
||||
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
|
||||
GLFunctions::glBindBuffer(0, gl_const::GLArrayBuffer);
|
||||
GLFunctions::glBindVertexArray(0);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ OTHER_FILES += \
|
|||
shaders/dashed_vertex_shader.vsh \
|
||||
shaders/debug_rect_fragment_shader.fsh \
|
||||
shaders/debug_rect_vertex_shader.vsh \
|
||||
shaders/discarded_texturing_fragment_shader.fsh \
|
||||
shaders/line_fragment_shader.fsh \
|
||||
shaders/line_vertex_shader.vsh \
|
||||
shaders/masked_texturing_billboard_vertex_shader.vsh \
|
||||
|
|
17
drape/shaders/discarded_texturing_fragment_shader.fsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Warning! Beware to use this shader. "discard" command may significally reduce performance.
|
||||
// Unfortunately some CG algorithms cannot be implemented on OpenGL ES 2.0 without discarding
|
||||
// fragments from depth buffer.
|
||||
|
||||
uniform sampler2D u_colorTex;
|
||||
uniform float u_opacity;
|
||||
|
||||
varying vec2 v_colorTexCoords;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 finalColor = texture2D(u_colorTex, v_colorTexCoords);
|
||||
finalColor.a *= u_opacity;
|
||||
if (finalColor.a < 0.01)
|
||||
discard;
|
||||
gl_FragColor = finalColor;
|
||||
}
|
|
@ -11,8 +11,8 @@ uniform vec4 u_routeParams;
|
|||
|
||||
const float kAntialiasingThreshold = 0.92;
|
||||
|
||||
const float kOutlineThreshold1 = 0.6;
|
||||
const float kOutlineThreshold2 = 0.5;
|
||||
const float kOutlineThreshold1 = 0.81;
|
||||
const float kOutlineThreshold2 = 0.71;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ MY_POSITION_PROGRAM my_position_shader.vsh texturing_fragment_shader.fsh
|
|||
BOOKMARK_PROGRAM user_mark.vsh texturing_fragment_shader.fsh
|
||||
ROUTE_PROGRAM route_vertex_shader.vsh route_fragment_shader.fsh
|
||||
ROUTE_DASH_PROGRAM route_vertex_shader.vsh route_dash_fragment_shader.fsh
|
||||
ROUTE_ARROW_PROGRAM route_arrow_vertex_shader.vsh texturing_fragment_shader.fsh
|
||||
ROUTE_ARROW_PROGRAM route_arrow_vertex_shader.vsh discarded_texturing_fragment_shader.fsh
|
||||
TRACK_POINT_PROGRAM trackpoint_vertex_shader.vsh trackpoint_fragment_shader.fsh
|
||||
DEBUG_RECT_PROGRAM debug_rect_vertex_shader.vsh debug_rect_fragment_shader.fsh
|
||||
TRANSPARENT_LAYER_PROGRAM transparent_layer_vertex_shader.vsh transparent_layer_fragment_shader.fsh
|
||||
|
|
|
@ -16,13 +16,15 @@ const float kAntialiasingThreshold = 0.92;
|
|||
const float kOutlineThreshold1 = 0.8;
|
||||
const float kOutlineThreshold2 = 0.5;
|
||||
|
||||
const float kMaskOpacity = 0.7;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(u_colorTex, v_colorTexCoord);
|
||||
float alphaCode = color.a;
|
||||
vec4 mask = texture2D(u_maskTex, v_maskTexCoord);
|
||||
color.a = u_opacity * (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_halfLength)));
|
||||
color.rgb = mix(color.rgb, mask.rgb * mix(u_lightArrowColor, u_darkArrowColor, step(alphaCode, 0.6)), mask.a);
|
||||
color.rgb = mix(color.rgb, mask.rgb * mix(u_lightArrowColor, u_darkArrowColor, step(alphaCode, 0.6)), mask.a * kMaskOpacity);
|
||||
if (u_outline > 0.0)
|
||||
{
|
||||
color.rgb = mix(color.rgb, u_outlineColor, step(kOutlineThreshold1, abs(v_halfLength)));
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "indexer/drawing_rules.hpp"
|
||||
#include "indexer/drules_include.hpp"
|
||||
#include "indexer/map_style_reader.hpp"
|
||||
#include "indexer/osm_editor.hpp"
|
||||
|
||||
#include "geometry/clipping.hpp"
|
||||
|
@ -365,7 +366,9 @@ void ApplyPointFeature::ProcessRule(Stylist::TRuleWrapper const & rule)
|
|||
{
|
||||
params.m_primaryOptional = false;
|
||||
params.m_primaryTextFont.m_size *= 1.2;
|
||||
params.m_primaryTextFont.m_outlineColor = dp::Color(255, 255, 255, 153);
|
||||
auto const style = GetStyleReader().GetCurrentStyle();
|
||||
params.m_primaryTextFont.m_outlineColor = (style == MapStyle::MapStyleDark) ?
|
||||
dp::Color(0, 0, 0, 153) : dp::Color(255, 255, 255, 153);
|
||||
params.m_secondaryTextFont = params.m_primaryTextFont;
|
||||
params.m_secondaryText = ExtractHotelInfo();
|
||||
params.m_secondaryOptional = false;
|
||||
|
|
|
@ -15,8 +15,12 @@ unordered_map<int, unordered_map<int, dp::Color>> kColorConstants =
|
|||
{ GuiText, dp::Color(77, 77, 77, 221) },
|
||||
{ MyPositionAccuracy, dp::Color(0, 0, 0, 20) },
|
||||
{ Selection, dp::Color(30, 150, 240, 164) },
|
||||
{ Route, dp::Color(65, 165, 245, 204) },
|
||||
{ RouteOutline, dp::Color(25, 120, 210, 204) },
|
||||
{ Route, dp::Color(0, 135, 255, 255) },
|
||||
{ RouteOutline, dp::Color(5, 95, 205, 255) },
|
||||
{ RouteTrafficG0, dp::Color(155, 35, 0, 255) },
|
||||
{ RouteTrafficG1, dp::Color(240, 60, 10, 255) },
|
||||
{ RouteTrafficG2, dp::Color(240, 60, 10, 255) },
|
||||
{ RouteTrafficG3, dp::Color(245, 215, 40, 127) },
|
||||
{ RoutePedestrian, dp::Color(29, 51, 158, 204) },
|
||||
{ RouteBicycle, dp::Color(156, 39, 176, 204) },
|
||||
{ Arrow3D, dp::Color(80, 170, 255, 255) },
|
||||
|
@ -25,13 +29,13 @@ unordered_map<int, unordered_map<int, dp::Color>> kColorConstants =
|
|||
{ TrackCarSpeed, dp::Color(21, 121, 244, 255) },
|
||||
{ TrackPlaneSpeed, dp::Color(10, 196, 255, 255) },
|
||||
{ TrackUnknownDistance, dp::Color(97, 97, 97, 255) },
|
||||
{ TrafficG0, dp::Color(180, 25, 25, 255) },
|
||||
{ TrafficG0, dp::Color(155, 35, 5, 255) },
|
||||
{ TrafficG1, dp::Color(230, 60, 55, 255) },
|
||||
{ TrafficG2, dp::Color(230, 60, 55, 255) },
|
||||
{ TrafficG3, dp::Color(250, 190, 45, 127) },
|
||||
{ TrafficG4, dp::Color(250, 190, 45, 127) },
|
||||
{ TrafficG5, dp::Color(55, 165, 55, 255) },
|
||||
{ TrafficTempBlock, dp::Color(75, 75, 75, 255) },
|
||||
{ TrafficG3, dp::Color(250, 180, 35, 127) },
|
||||
{ TrafficG4, dp::Color(155, 175, 55, 255) },
|
||||
{ TrafficG5, dp::Color(70, 135, 85, 255) },
|
||||
{ TrafficTempBlock, dp::Color(70, 70, 70, 255) },
|
||||
{ TrafficUnknown, dp::Color(0, 0, 0, 0) },
|
||||
{ TrafficArrowLight, dp::Color(255, 255, 255, 255) },
|
||||
{ TrafficArrowDark, dp::Color(107, 81, 20, 255) },
|
||||
|
@ -43,8 +47,12 @@ unordered_map<int, unordered_map<int, dp::Color>> kColorConstants =
|
|||
{ GuiText, dp::Color(255, 255, 255, 178) },
|
||||
{ MyPositionAccuracy, dp::Color(255, 255, 255, 15) },
|
||||
{ Selection, dp::Color(255, 230, 140, 164) },
|
||||
{ Route, dp::Color(255, 225, 120, 180) },
|
||||
{ RouteOutline, dp::Color(205, 180, 95, 180) },
|
||||
{ Route, dp::Color(0, 135, 255, 255) },
|
||||
{ RouteOutline, dp::Color(5, 95, 205, 255) },
|
||||
{ RouteTrafficG0, dp::Color(155, 35, 0, 255) },
|
||||
{ RouteTrafficG1, dp::Color(240, 60, 10, 255) },
|
||||
{ RouteTrafficG2, dp::Color(240, 60, 10, 255) },
|
||||
{ RouteTrafficG3, dp::Color(245, 215, 40, 127) },
|
||||
{ RoutePedestrian, dp::Color(255, 185, 75, 180) },
|
||||
{ RouteBicycle, dp::Color(255, 75, 140, 180) },
|
||||
{ Arrow3D, dp::Color(255, 220, 120, 255) },
|
||||
|
@ -53,13 +61,13 @@ unordered_map<int, unordered_map<int, dp::Color>> kColorConstants =
|
|||
{ TrackCarSpeed, dp::Color(255, 202, 40, 255) },
|
||||
{ TrackPlaneSpeed, dp::Color(255, 245, 160, 255) },
|
||||
{ TrackUnknownDistance, dp::Color(150, 150, 150, 255) },
|
||||
{ TrafficG0, dp::Color(70, 15, 0, 255) },
|
||||
{ TrafficG1, dp::Color(105, 20, 0, 255) },
|
||||
{ TrafficG2, dp::Color(105, 20, 0, 255) },
|
||||
{ TrafficG3, dp::Color(115, 80, 0, 127) },
|
||||
{ TrafficG4, dp::Color(115, 80, 0, 127) },
|
||||
{ TrafficG5, dp::Color(25, 75, 25, 255) },
|
||||
{ TrafficTempBlock, dp::Color(40, 40, 40, 255) },
|
||||
{ TrafficG0, dp::Color(65, 15, 0, 255) },
|
||||
{ TrafficG1, dp::Color(120, 25, 25, 255) },
|
||||
{ TrafficG2, dp::Color(120, 25, 25, 255) },
|
||||
{ TrafficG3, dp::Color(140, 90, 0, 127) },
|
||||
{ TrafficG4, dp::Color(85, 85, 25, 255) },
|
||||
{ TrafficG5, dp::Color(40, 80, 50, 255) },
|
||||
{ TrafficTempBlock, dp::Color(35, 35, 35, 255) },
|
||||
{ TrafficUnknown, dp::Color(0, 0, 0, 0) },
|
||||
{ TrafficArrowLight, dp::Color(170, 170, 170, 255) },
|
||||
{ TrafficArrowDark, dp::Color(30, 30, 30, 255) },
|
||||
|
|
|
@ -14,6 +14,10 @@ enum ColorConstant
|
|||
Selection,
|
||||
Route,
|
||||
RouteOutline,
|
||||
RouteTrafficG0,
|
||||
RouteTrafficG1,
|
||||
RouteTrafficG2,
|
||||
RouteTrafficG3,
|
||||
RoutePedestrian,
|
||||
RouteBicycle,
|
||||
Arrow3D,
|
||||
|
|
|
@ -491,6 +491,10 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
|||
|
||||
m2::PointD const finishPoint = routeData->m_sourcePolyline.Back();
|
||||
m_routeRenderer->SetRouteData(move(routeData), make_ref(m_gpuProgramManager));
|
||||
// Here we have to recache route arrows.
|
||||
m_routeRenderer->UpdateRoute(m_userEventStream.GetCurrentScreen(),
|
||||
bind(&FrontendRenderer::OnCacheRouteArrows, this, _1, _2));
|
||||
|
||||
if (!m_routeRenderer->GetFinishPoint())
|
||||
{
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
|
@ -1094,8 +1098,6 @@ void FrontendRenderer::RenderScene(ScreenBase const & modelView)
|
|||
BeforeDrawFrame();
|
||||
#endif
|
||||
|
||||
bool const isPerspective = modelView.isPerspective();
|
||||
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
m_viewport.Apply();
|
||||
RefreshBgColor();
|
||||
|
@ -1103,10 +1105,22 @@ void FrontendRenderer::RenderScene(ScreenBase const & modelView)
|
|||
|
||||
Render2dLayer(modelView);
|
||||
|
||||
bool hasSelectedPOI = false;
|
||||
if (m_framebuffer->IsSupported())
|
||||
{
|
||||
RenderTrafficAndRouteLayer(modelView);
|
||||
Render3dLayer(modelView, true /* useFramebuffer */);
|
||||
}
|
||||
else
|
||||
{
|
||||
Render3dLayer(modelView, false /* useFramebuffer */);
|
||||
RenderTrafficAndRouteLayer(modelView);
|
||||
}
|
||||
|
||||
// After this line we do not use depth buffer.
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
|
||||
if (m_selectionShape != nullptr)
|
||||
{
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
SelectionShape::ESelectedObject selectedObject = m_selectionShape->GetSelectedObject();
|
||||
if (selectedObject == SelectionShape::OBJECT_MY_POSITION)
|
||||
{
|
||||
|
@ -1117,44 +1131,14 @@ void FrontendRenderer::RenderScene(ScreenBase const & modelView)
|
|||
}
|
||||
else if (selectedObject == SelectionShape::OBJECT_POI)
|
||||
{
|
||||
if (!isPerspective && m_layers[RenderLayer::Geometry3dID].m_renderGroups.empty())
|
||||
m_selectionShape->Render(modelView, m_currentZoomLevel,
|
||||
make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
else
|
||||
hasSelectedPOI = true;
|
||||
m_selectionShape->Render(modelView, m_currentZoomLevel, make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_framebuffer->IsSupported())
|
||||
{
|
||||
RenderTrafficAndRouteLayer(modelView);
|
||||
|
||||
m_framebuffer->Enable();
|
||||
GLFunctions::glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
GLFunctions::glClear();
|
||||
Render3dLayer(modelView);
|
||||
m_framebuffer->Disable();
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
m_transparentLayer->Render(m_framebuffer->GetTextureId(), make_ref(m_gpuProgramManager));
|
||||
}
|
||||
else
|
||||
{
|
||||
GLFunctions::glClearDepth();
|
||||
Render3dLayer(modelView);
|
||||
RenderTrafficAndRouteLayer(modelView);
|
||||
}
|
||||
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
if (hasSelectedPOI)
|
||||
m_selectionShape->Render(modelView, m_currentZoomLevel, make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
GLFunctions::glClearDepth();
|
||||
RenderOverlayLayer(modelView);
|
||||
|
||||
m_gpsTrackRenderer->RenderTrack(modelView, m_currentZoomLevel, make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
if (m_selectionShape != nullptr && m_selectionShape->GetSelectedObject() == SelectionShape::OBJECT_USER_MARK)
|
||||
m_selectionShape->Render(modelView, m_currentZoomLevel, make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
|
||||
|
@ -1169,8 +1153,6 @@ void FrontendRenderer::RenderScene(ScreenBase const & modelView)
|
|||
if (m_guiRenderer != nullptr)
|
||||
m_guiRenderer->Render(make_ref(m_gpuProgramManager), m_myPositionController->IsInRouting(), modelView);
|
||||
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
|
||||
#if defined(RENDER_DEBUG_RECTS) && defined(COLLECT_DISPLACEMENT_INFO)
|
||||
for (auto const & arrow : m_overlayTree->GetDisplacementInfo())
|
||||
dp::DebugRectRenderer::Instance().DrawArrow(modelView, arrow);
|
||||
|
@ -1192,13 +1174,29 @@ void FrontendRenderer::Render2dLayer(ScreenBase const & modelView)
|
|||
RenderSingleGroup(modelView, make_ref(group));
|
||||
}
|
||||
|
||||
void FrontendRenderer::Render3dLayer(ScreenBase const & modelView)
|
||||
void FrontendRenderer::Render3dLayer(ScreenBase const & modelView, bool useFramebuffer)
|
||||
{
|
||||
if (useFramebuffer)
|
||||
{
|
||||
ASSERT(m_framebuffer->IsSupported(), ());
|
||||
m_framebuffer->Enable();
|
||||
GLFunctions::glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
GLFunctions::glClear();
|
||||
}
|
||||
|
||||
GLFunctions::glClearDepth();
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
RenderLayer & layer = m_layers[RenderLayer::Geometry3dID];
|
||||
layer.Sort(make_ref(m_overlayTree));
|
||||
for (drape_ptr<RenderGroup> const & group : layer.m_renderGroups)
|
||||
RenderSingleGroup(modelView, make_ref(group));
|
||||
|
||||
if (useFramebuffer)
|
||||
{
|
||||
m_framebuffer->Disable();
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
m_transparentLayer->Render(m_framebuffer->GetTextureId(), make_ref(m_gpuProgramManager));
|
||||
}
|
||||
}
|
||||
|
||||
void FrontendRenderer::RenderOverlayLayer(ScreenBase const & modelView)
|
||||
|
@ -1211,15 +1209,13 @@ void FrontendRenderer::RenderOverlayLayer(ScreenBase const & modelView)
|
|||
|
||||
void FrontendRenderer::RenderTrafficAndRouteLayer(ScreenBase const & modelView)
|
||||
{
|
||||
GLFunctions::glClearDepth();
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
if (m_trafficRenderer->HasRenderData())
|
||||
{
|
||||
GLFunctions::glClearDepth();
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
m_trafficRenderer->RenderTraffic(modelView, m_currentZoomLevel, 1.0f /* opacity */,
|
||||
make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
}
|
||||
|
||||
GLFunctions::glDisable(gl_const::GLDepthTest);
|
||||
m_routeRenderer->RenderRoute(modelView, m_trafficRenderer->HasRenderData(),
|
||||
make_ref(m_gpuProgramManager), m_generalUniforms);
|
||||
}
|
||||
|
@ -1657,7 +1653,6 @@ void FrontendRenderer::OnContextCreate()
|
|||
GLFunctions::AttachCache(this_thread::get_id());
|
||||
|
||||
GLFunctions::glPixelStore(gl_const::GLUnpackAlignment, 1);
|
||||
GLFunctions::glEnable(gl_const::GLDepthTest);
|
||||
|
||||
GLFunctions::glClearDepthValue(1.0);
|
||||
GLFunctions::glDepthFunc(gl_const::GLLessOrEqual);
|
||||
|
|
|
@ -174,7 +174,7 @@ private:
|
|||
//////
|
||||
/// Render part of scene
|
||||
void Render2dLayer(ScreenBase const & modelView);
|
||||
void Render3dLayer(ScreenBase const & modelView);
|
||||
void Render3dLayer(ScreenBase const & modelView, bool useFramebuffer);
|
||||
void RenderOverlayLayer(ScreenBase const & modelView);
|
||||
void RenderUserMarksLayer(ScreenBase const & modelView);
|
||||
void RenderTrafficAndRouteLayer(ScreenBase const & modelView);
|
||||
|
|
|
@ -294,8 +294,6 @@ void GpsTrackRenderer::RenderTrack(ScreenBase const & screen, int zoomLevel,
|
|||
if (m_handlesCache.empty() || m_handlesCache.front().second == 0)
|
||||
return;
|
||||
|
||||
GLFunctions::glClearDepth();
|
||||
|
||||
ASSERT_LESS_OR_EQUAL(m_renderData.size(), m_handlesCache.size(), ());
|
||||
|
||||
// Render points.
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace df
|
|||
namespace
|
||||
{
|
||||
|
||||
float const kHalfWidthInPixel[] =
|
||||
float const kHalfWidthInPixelVehicle[] =
|
||||
{
|
||||
// 1 2 3 4 5 6 7 8 9 10
|
||||
1.0f, 1.0f, 1.5f, 1.5f, 1.5f, 2.0f, 2.0f, 2.0f, 2.5f, 2.5f,
|
||||
|
@ -27,6 +27,14 @@ float const kHalfWidthInPixel[] =
|
|||
3.0f, 3.0f, 4.0f, 5.0f, 6.0, 8.0f, 10.0f, 10.0f, 18.0f, 27.0f
|
||||
};
|
||||
|
||||
float const kHalfWidthInPixelOthers[] =
|
||||
{
|
||||
// 1 2 3 4 5 6 7 8 9 10
|
||||
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.2f, 1.2f,
|
||||
//11 12 13 14 15 16 17 18 19 20
|
||||
1.5f, 1.5f, 2.0f, 2.5f, 3.0, 4.0f, 5.0f, 5.0f, 9.0f, 13.0f
|
||||
};
|
||||
|
||||
int const kArrowAppearingZoomLevel = 14;
|
||||
int const kInvalidGroup = -1;
|
||||
|
||||
|
@ -120,17 +128,22 @@ RouteRenderer::RouteRenderer()
|
|||
: m_distanceFromBegin(0.0)
|
||||
{}
|
||||
|
||||
void RouteRenderer::InterpolateByZoom(ScreenBase const & screen, float & halfWidth, double & zoom) const
|
||||
void RouteRenderer::InterpolateByZoom(ScreenBase const & screen, ColorConstant color,
|
||||
float & halfWidth, double & zoom) const
|
||||
{
|
||||
double const zoomLevel = GetZoomLevel(screen.GetScale());
|
||||
zoom = trunc(zoomLevel);
|
||||
int const index = zoom - 1.0;
|
||||
float const lerpCoef = zoomLevel - zoom;
|
||||
|
||||
float const * halfWidthInPixel = kHalfWidthInPixelVehicle;
|
||||
if (color != ColorConstant::Route)
|
||||
halfWidthInPixel = kHalfWidthInPixelOthers;
|
||||
|
||||
if (index < scales::UPPER_STYLE_SCALE)
|
||||
halfWidth = kHalfWidthInPixel[index] + lerpCoef * (kHalfWidthInPixel[index + 1] - kHalfWidthInPixel[index]);
|
||||
halfWidth = halfWidthInPixel[index] + lerpCoef * (halfWidthInPixel[index + 1] - halfWidthInPixel[index]);
|
||||
else
|
||||
halfWidth = kHalfWidthInPixel[scales::UPPER_STYLE_SCALE];
|
||||
halfWidth = halfWidthInPixel[scales::UPPER_STYLE_SCALE];
|
||||
|
||||
halfWidth *= df::VisualParams::Instance().GetVisualScale();
|
||||
}
|
||||
|
@ -144,7 +157,7 @@ void RouteRenderer::UpdateRoute(ScreenBase const & screen, TCacheRouteArrowsCall
|
|||
|
||||
// Interpolate values by zoom level.
|
||||
double zoom = 0.0;
|
||||
InterpolateByZoom(screen, m_currentHalfWidth, zoom);
|
||||
InterpolateByZoom(screen, m_routeData->m_color, m_currentHalfWidth, zoom);
|
||||
|
||||
// Update arrows.
|
||||
if (zoom >= kArrowAppearingZoomLevel && !m_routeData->m_sourceTurns.empty())
|
||||
|
@ -156,8 +169,8 @@ void RouteRenderer::UpdateRoute(ScreenBase const & screen, TCacheRouteArrowsCall
|
|||
if (glbHalfLen < glbHalfTextureLen)
|
||||
glbHalfLen = glbHalfTextureLen;
|
||||
|
||||
double const glbArrowHead = 2.0 * kArrowHeadSize * glbHalfTextureLen;
|
||||
double const glbArrowTail = 2.0 * kArrowTailSize * glbHalfTextureLen;
|
||||
double const glbArrowHead = 2.0 * kArrowHeadSize * glbHalfTextureLen;
|
||||
double const glbArrowTail = 2.0 * kArrowTailSize * glbHalfTextureLen;
|
||||
double const glbMinArrowSize = glbArrowHead + glbArrowTail;
|
||||
|
||||
double const kExtendCoef = 1.1;
|
||||
|
|
|
@ -41,7 +41,8 @@ public:
|
|||
void UpdateDistanceFromBegin(double distanceFromBegin);
|
||||
|
||||
private:
|
||||
void InterpolateByZoom(ScreenBase const & screen, float & halfWidth, double & zoom) const;
|
||||
void InterpolateByZoom(ScreenBase const & screen, ColorConstant color,
|
||||
float & halfWidth, double & zoom) const;
|
||||
void RenderRouteSign(drape_ptr<RouteSignData> const & sign, ScreenBase const & screen,
|
||||
ref_ptr<dp::GpuProgramManager> mng, dp::UniformValuesStorage const & commonUniforms);
|
||||
|
||||
|
|
|
@ -21,9 +21,12 @@ namespace df
|
|||
namespace
|
||||
{
|
||||
|
||||
float const kLeftSide = 1.0;
|
||||
float const kCenter = 0.0;
|
||||
float const kRightSide = -1.0;
|
||||
float const kLeftSide = 1.0f;
|
||||
float const kCenter = 0.0f;
|
||||
float const kRightSide = -1.0f;
|
||||
|
||||
float const kRouteDepth = 100.0f;
|
||||
float const kArrowsDepth = 200.0f;
|
||||
|
||||
void GetArrowTextureRegion(ref_ptr<dp::TextureManager> textures, dp::TextureManager::SymbolRegion & region)
|
||||
{
|
||||
|
@ -78,13 +81,12 @@ vector<m2::PointD> CalculatePoints(m2::PolylineD const & polyline, double start,
|
|||
return result;
|
||||
}
|
||||
|
||||
void GenerateJoinsTriangles(glsl::vec3 const & pivot, vector<glsl::vec2> const & normals,
|
||||
void GenerateJoinsTriangles(glsl::vec3 const & pivot, vector<glsl::vec2> const & normals, glsl::vec4 const & color,
|
||||
glsl::vec2 const & length, bool isLeft, RouteShape::TGeometryBuffer & joinsGeometry)
|
||||
{
|
||||
float const kEps = 1e-5;
|
||||
size_t const trianglesCount = normals.size() / 3;
|
||||
float const side = isLeft ? kLeftSide : kRightSide;
|
||||
glsl::vec4 const color(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
for (int j = 0; j < trianglesCount; j++)
|
||||
{
|
||||
glsl::vec3 const len1 = glsl::vec3(length.x, length.y, glsl::length(normals[3 * j]) < kEps ? kCenter : side);
|
||||
|
@ -138,10 +140,14 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
segments.reserve(path.size() - 1);
|
||||
ConstructLineSegments(path, segmentsColors, segments);
|
||||
|
||||
if (segments.empty())
|
||||
return;
|
||||
|
||||
// Build geometry.
|
||||
float length = 0;
|
||||
float const kDepth = 0.0f;
|
||||
for (size_t i = 0; i < segments.size(); i++)
|
||||
float length = 0.0f;
|
||||
float depth = 0.0f;
|
||||
float const depthStep = kRouteDepth / (1 + segments.size());
|
||||
for (int i = static_cast<int>(segments.size() - 1); i >= 0; i--)
|
||||
{
|
||||
UpdateNormals(&segments[i], (i > 0) ? &segments[i - 1] : nullptr,
|
||||
(i < segments.size() - 1) ? &segments[i + 1] : nullptr);
|
||||
|
@ -152,8 +158,9 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
m2::PointD const endPt = MapShape::ConvertToLocal(glsl::FromVec2(segments[i].m_points[EndPoint]),
|
||||
pivot, kShapeCoordScalar);
|
||||
|
||||
glsl::vec3 const startPivot = glsl::vec3(glsl::ToVec2(startPt), kDepth);
|
||||
glsl::vec3 const endPivot = glsl::vec3(glsl::ToVec2(endPt), kDepth);
|
||||
glsl::vec3 const startPivot = glsl::vec3(glsl::ToVec2(startPt), depth);
|
||||
glsl::vec3 const endPivot = glsl::vec3(glsl::ToVec2(endPt), depth);
|
||||
depth += depthStep;
|
||||
|
||||
float const endLength = length + glsl::length(segments[i].m_points[EndPoint] - segments[i].m_points[StartPoint]);
|
||||
|
||||
|
@ -178,7 +185,7 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
geometry.push_back(RV(endPivot, glsl::vec2(0, 0), glsl::vec3(endLength, 0, kCenter), segments[i].m_color));
|
||||
|
||||
// Generate joins.
|
||||
if (segments[i].m_generateJoin && i < segments.size() - 1)
|
||||
if (segments[i].m_generateJoin && i < static_cast<int>(segments.size()) - 1)
|
||||
{
|
||||
glsl::vec2 n1 = segments[i].m_hasLeftJoin[EndPoint] ? segments[i].m_leftNormals[EndPoint] :
|
||||
segments[i].m_rightNormals[EndPoint];
|
||||
|
@ -193,7 +200,7 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
GenerateJoinNormals(dp::RoundJoin, n1, n2, 1.0f, segments[i].m_hasLeftJoin[EndPoint],
|
||||
widthScalar, normals);
|
||||
|
||||
GenerateJoinsTriangles(endPivot, normals, glsl::vec2(endLength, 0),
|
||||
GenerateJoinsTriangles(endPivot, normals, segments[i].m_color, glsl::vec2(endLength, 0),
|
||||
segments[i].m_hasLeftJoin[EndPoint], joinsGeometry);
|
||||
}
|
||||
|
||||
|
@ -206,7 +213,8 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
segments[i].m_rightNormals[StartPoint], -segments[i].m_tangent,
|
||||
1.0f, true /* isStart */, normals);
|
||||
|
||||
GenerateJoinsTriangles(startPivot, normals, glsl::vec2(length, 0), true, joinsGeometry);
|
||||
GenerateJoinsTriangles(startPivot, normals, segments[i].m_color, glsl::vec2(length, 0),
|
||||
true, joinsGeometry);
|
||||
}
|
||||
|
||||
if (i == segments.size() - 1)
|
||||
|
@ -217,7 +225,8 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
segments[i].m_rightNormals[EndPoint], segments[i].m_tangent,
|
||||
1.0f, false /* isStart */, normals);
|
||||
|
||||
GenerateJoinsTriangles(endPivot, normals, glsl::vec2(endLength, 0), true, joinsGeometry);
|
||||
GenerateJoinsTriangles(endPivot, normals, segments[i].m_color, glsl::vec2(endLength, 0),
|
||||
true, joinsGeometry);
|
||||
}
|
||||
|
||||
length = endLength;
|
||||
|
@ -227,7 +236,7 @@ void RouteShape::PrepareGeometry(vector<m2::PointD> const & path, m2::PointD con
|
|||
}
|
||||
|
||||
void RouteShape::PrepareArrowGeometry(vector<m2::PointD> const & path, m2::PointD const & pivot,
|
||||
m2::RectF const & texRect, float depth,
|
||||
m2::RectF const & texRect, float depthStep, float depth,
|
||||
TArrowGeometryBuffer & geometry, TArrowGeometryBuffer & joinsGeometry)
|
||||
{
|
||||
ASSERT(path.size() > 1, ());
|
||||
|
@ -242,6 +251,7 @@ void RouteShape::PrepareArrowGeometry(vector<m2::PointD> const & path, m2::Point
|
|||
tr.setMaxX(texRect.minX() * kArrowHeadSize + texRect.maxX() * (1.0 - kArrowHeadSize));
|
||||
|
||||
// Build geometry.
|
||||
float const depthInc = depthStep / (segments.size() + 1);
|
||||
for (size_t i = 0; i < segments.size(); i++)
|
||||
{
|
||||
UpdateNormals(&segments[i], (i > 0) ? &segments[i - 1] : nullptr,
|
||||
|
@ -255,6 +265,7 @@ void RouteShape::PrepareArrowGeometry(vector<m2::PointD> const & path, m2::Point
|
|||
|
||||
glsl::vec4 const startPivot = glsl::vec4(glsl::ToVec2(startPt), depth, 1.0);
|
||||
glsl::vec4 const endPivot = glsl::vec4(glsl::ToVec2(endPt), depth, 1.0);
|
||||
depth += depthInc;
|
||||
|
||||
glsl::vec2 const leftNormalStart = GetNormal(segments[i], true /* isLeft */, StartNormal);
|
||||
glsl::vec2 const rightNormalStart = GetNormal(segments[i], false /* isLeft */, StartNormal);
|
||||
|
@ -311,7 +322,9 @@ void RouteShape::PrepareArrowGeometry(vector<m2::PointD> const & path, m2::Point
|
|||
};
|
||||
float const u = 1.0f - kArrowHeadSize;
|
||||
vector<glsl::vec2> uv = { glsl::vec2(u, 1.0f), glsl::vec2(u, 0.0f), glsl::vec2(1.0f, 0.5f) };
|
||||
GenerateArrowsTriangles(endPivot, normals, texRect, uv, true /* normalizedUV */, joinsGeometry);
|
||||
glsl::vec4 const headPivot = glsl::vec4(glsl::ToVec2(endPt), depth, 1.0);
|
||||
depth += depthInc;
|
||||
GenerateArrowsTriangles(headPivot, normals, texRect, uv, true /* normalizedUV */, joinsGeometry);
|
||||
}
|
||||
|
||||
// Generate arrow tail.
|
||||
|
@ -390,13 +403,15 @@ void RouteShape::CacheRouteArrows(ref_ptr<dp::TextureManager> mng, m2::PolylineD
|
|||
state.SetColorTexture(region.GetTexture());
|
||||
|
||||
// Generate arrow geometry.
|
||||
float depth = 0.0f;
|
||||
float depth = kArrowsDepth;
|
||||
float const depthStep = (kArrowsDepth - kRouteDepth) / (1 + borders.size());
|
||||
for (ArrowBorders const & b : borders)
|
||||
{
|
||||
depth -= depthStep;
|
||||
vector<m2::PointD> points = CalculatePoints(polyline, b.m_startDistance, b.m_endDistance);
|
||||
ASSERT_LESS_OR_EQUAL(points.size(), polyline.GetSize(), ());
|
||||
PrepareArrowGeometry(points, routeArrowsData.m_pivot, region.GetTexRect(), depth, geometry, joinsGeometry);
|
||||
depth += 1.0f;
|
||||
PrepareArrowGeometry(points, routeArrowsData.m_pivot, region.GetTexRect(), depthStep,
|
||||
depth, geometry, joinsGeometry);
|
||||
}
|
||||
|
||||
BatchGeometry(state, make_ref(geometry.data()), geometry.size(),
|
||||
|
@ -411,8 +426,10 @@ void RouteShape::CacheRoute(ref_ptr<dp::TextureManager> textures, RouteData & ro
|
|||
auto const & style = GetStyleReader().GetCurrentStyle();
|
||||
for (auto const & speedGroup : routeData.m_traffic)
|
||||
{
|
||||
dp::Color const color = df::GetColorConstant(style, TrafficGenerator::GetColorBySpeedGroup(speedGroup));
|
||||
float const alpha = (speedGroup == traffic::SpeedGroup::G5 ||
|
||||
dp::Color const color = df::GetColorConstant(style, TrafficGenerator::GetColorBySpeedGroup(speedGroup,
|
||||
true /* route */));
|
||||
float const alpha = (speedGroup == traffic::SpeedGroup::G4 ||
|
||||
speedGroup == traffic::SpeedGroup::G5 ||
|
||||
speedGroup == traffic::SpeedGroup::Unknown) ? 0.0f : 1.0f;
|
||||
segmentsColors.push_back(glsl::vec4(color.GetRedF(), color.GetGreenF(), color.GetBlueF(), alpha));
|
||||
}
|
||||
|
|
|
@ -18,17 +18,21 @@
|
|||
namespace df
|
||||
{
|
||||
|
||||
double const kArrowSize = 0.001;
|
||||
double const kArrowSize = 0.0008;
|
||||
|
||||
// Constants below depend on arrow texture.
|
||||
double const kArrowHeadSize = 124.0 / 400.0;
|
||||
float const kArrowHeadFactor = 124.0f / 96.0f;
|
||||
double const kArrowTextureWidth = 74.0;
|
||||
double const kArrowTextureHeight = 44.0;
|
||||
double const kArrowBodyHeight = 24.0;
|
||||
double const kArrowHeadTextureWidth = 32.0;
|
||||
double const kArrowTailTextureWidth = 4.0;
|
||||
|
||||
double const kArrowTailSize = 20.0 / 400.0;
|
||||
float const kArrowTailFactor = 20.0f / 96.0f;
|
||||
|
||||
double const kArrowHeightFactor = 96.0 / 36.0;
|
||||
double const kArrowAspect = 400.0 / 192.0;
|
||||
double const kArrowHeadSize = kArrowHeadTextureWidth / kArrowTextureWidth;
|
||||
float const kArrowHeadFactor = 2.0 * kArrowHeadTextureWidth / kArrowTextureHeight;
|
||||
double const kArrowTailSize = kArrowTailTextureWidth / kArrowTextureWidth;
|
||||
float const kArrowTailFactor = 2.0 * kArrowTailTextureWidth / kArrowTextureHeight;
|
||||
double const kArrowHeightFactor = kArrowTextureHeight / kArrowBodyHeight;
|
||||
double const kArrowAspect = kArrowTextureWidth / kArrowTextureHeight;
|
||||
|
||||
struct RoutePattern
|
||||
{
|
||||
|
@ -108,7 +112,7 @@ private:
|
|||
TGeometryBuffer & geometry, TGeometryBuffer & joinsGeometry,
|
||||
double & outputLength);
|
||||
static void PrepareArrowGeometry(vector<m2::PointD> const & path, m2::PointD const & pivot,
|
||||
m2::RectF const & texRect, float depth,
|
||||
m2::RectF const & texRect, float depthStep, float depth,
|
||||
TArrowGeometryBuffer & geometry, TArrowGeometryBuffer & joinsGeometry);
|
||||
static void BatchGeometry(dp::GLState const & state, ref_ptr<void> geometry, size_t geomSize,
|
||||
ref_ptr<void> joinsGeometry, size_t joinsGeomSize,
|
||||
|
|