mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-30 01:24:07 +00:00
Compare commits
4 Commits
map-per-co
...
fx_topbar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee854dd9f2 | ||
|
|
33e4894a56 | ||
|
|
aa34159ce8 | ||
|
|
1ccea5928f |
@@ -98,6 +98,11 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
||||
mSpeedLimit = topFrame.findViewById(R.id.nav_speed_limit);
|
||||
mCurrentSpeed = topFrame.findViewById(R.id.nav_current_speed);
|
||||
|
||||
View mTopbar = topFrame.findViewById(R.id.statutbar);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(mTopbar,(v, windowInsets) -> {
|
||||
UiUtils.setViewNavigationTopInsetsMargin(v, windowInsets);
|
||||
return windowInsets;
|
||||
});
|
||||
// Show a blank view below the navbar to hide the menu content
|
||||
final View navigationBarBackground = mFrame.findViewById(R.id.nav_bottom_sheet_nav_bar);
|
||||
final View nextTurnContainer = mFrame.findViewById(R.id.nav_next_turn_container);
|
||||
|
||||
@@ -281,6 +281,14 @@ public final class UiUtils
|
||||
view.setPadding(systemInsets.left, systemInsets.top, systemInsets.right, view.getPaddingBottom());
|
||||
}
|
||||
|
||||
public static void setViewNavigationTopInsetsMargin(View view, WindowInsetsCompat windowInsets)
|
||||
{
|
||||
final Insets systemInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
||||
lp.topMargin = systemInsets.top;
|
||||
view.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
public static void setupNavigationIcon(@NonNull MaterialToolbar toolbar, @NonNull View.OnClickListener listener)
|
||||
{
|
||||
View customNavigationButton = toolbar.findViewById(R.id.back);
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/statutbar"
|
||||
android:layout_height="15dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus_eight"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
android:elevation="@dimen/nav_elevation"
|
||||
@@ -52,7 +51,6 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/street_frame"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/statutbar"
|
||||
android:layout_marginTop="@dimen/margin_half_plus_eight"
|
||||
android:layout_marginStart="@dimen/margin_quarter"
|
||||
android:clickable="true"
|
||||
android:elevation="@dimen/nav_elevation">
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/statutbar"
|
||||
android:layout_height="25dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:layout_marginStart="@dimen/nav_street_left"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
@@ -55,7 +54,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/statutbar"
|
||||
android:layout_marginStart="@dimen/margin_half"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:clickable="true"
|
||||
android:elevation="@dimen/nav_elevation">
|
||||
<LinearLayout
|
||||
|
||||
4610
data/countries.txt
4610
data/countries.txt
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"World": {
|
||||
"languages": ["int_name", "en", "default"]
|
||||
},
|
||||
"WorldCoasts": {
|
||||
"languages": ["int_name", "en", "default"]
|
||||
},
|
||||
"Abkhazia": {
|
||||
"languages": ["ab", "ru"]
|
||||
},
|
||||
|
||||
@@ -45,9 +45,8 @@
|
||||
#
|
||||
# A C++ parser implementation used by the generator is in generator/utils.cpp::ParseMapCSS().
|
||||
# A python parser implementation used to compile *.mapcss style files is in tools/kothic/src/libkomwm.py::komap_mapswithme().
|
||||
# The rendering engine in the app doesn't use this file directly, it loads a data/types.txt
|
||||
# The app doesn't use this file directly, it loads a data/types.txt
|
||||
# which is derived from this file during style files compilation.
|
||||
# A C++ parser for matching types to OSM tags is implemented in editor/feature_type_to_osm.cpp.
|
||||
#
|
||||
# Types that don't have any style defined are discarded by the generator.
|
||||
# To prevent discarding, add them to the exceptions in indexer/feature_visibility.cpp::IsUsefulNondrawableType()
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 7 and column 16.
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"data_format": 1,
|
||||
"data_url": "https://codeberg.org/comaps/comaps/raw/branch/main/data/taginfo.json",
|
||||
"data_updated": "20251120T121118Z",
|
||||
"data_updated": "20251228T203737Z",
|
||||
"project": {
|
||||
"name": "CoMaps",
|
||||
"description": "CoMaps is a community-focused privacy navigation iOS & Android app for travelers - drivers, hikers, and cyclists.",
|
||||
@@ -176,7 +176,7 @@
|
||||
"description": "amenity=car_pooling",
|
||||
"key": "amenity",
|
||||
"value": "car_pooling",
|
||||
"icon_url": "https://codeberg.org/comaps/comaps/raw/branch/main/data/styles/default/light/symbols/parking-pooling-m.svg"
|
||||
"icon_url": "https://codeberg.org/comaps/comaps/raw/branch/main/data/styles/default/light/symbols/parking_pooling-m.svg"
|
||||
},
|
||||
{
|
||||
"description": "amenity=car_rental",
|
||||
@@ -431,6 +431,12 @@
|
||||
"value": "hunting_stand",
|
||||
"icon_url": "https://codeberg.org/comaps/comaps/raw/branch/main/data/styles/default/light/symbols/hunting-tower-m.svg"
|
||||
},
|
||||
{
|
||||
"description": "amenity=hydrant",
|
||||
"key": "amenity",
|
||||
"value": "hydrant",
|
||||
"icon_url": "https://codeberg.org/comaps/comaps/raw/branch/main/data/styles/default/light/symbols/hydrant-m.svg"
|
||||
},
|
||||
{
|
||||
"description": "amenity=ice_cream",
|
||||
"key": "amenity",
|
||||
|
||||
@@ -35,31 +35,24 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
getline(s, line);
|
||||
strings::Trim(line);
|
||||
|
||||
// skip empty lines and comments
|
||||
if (line.empty() || line.front() == '#')
|
||||
// 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> rowTokens;
|
||||
strings::ParseCSVRow(line, ';', rowTokens);
|
||||
|
||||
// make sure entry is in full or short format
|
||||
if (rowTokens.size() != 3 && rowTokens.size() != 7)
|
||||
std::vector<std::string_view> const rowTokens = strings::Tokenize(line, ";");
|
||||
if (rowTokens.size() < 2)
|
||||
{
|
||||
ASSERT(false, ("Invalid feature type definition:", line));
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip deprecated and moved types
|
||||
if ((rowTokens.size() == 3 && !rowTokens[2].empty()) || (rowTokens.size() == 7 && rowTokens[2] == "x"))
|
||||
continue;
|
||||
|
||||
// Get internal feature type
|
||||
ASSERT(!rowTokens[0].empty(), ("No feature type found:", line));
|
||||
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() == 3)
|
||||
if (rowTokens.size() == 2)
|
||||
{
|
||||
// Derive OSM tags from type name
|
||||
ASSERT(featureTypeTokens.size() <= 2, ("OSM tags can not be inferred from name:", line));
|
||||
@@ -84,11 +77,6 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
else
|
||||
{
|
||||
// OSM tags are listed in the feature type entry
|
||||
if (rowTokens[1].empty())
|
||||
{
|
||||
ASSERT(false, ("No OSM tags found:", line));
|
||||
continue;
|
||||
}
|
||||
std::vector<std::string_view> const osmTagTokens = strings::Tokenize(rowTokens[1], ",");
|
||||
|
||||
// First entry is the best practice way to tag a feature
|
||||
|
||||
Reference in New Issue
Block a user