Compare commits
18 Commits
jb_err_msg
...
test/2025.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85ee511d78 | ||
|
|
48d0adf66b | ||
|
|
3b057bea71 | ||
|
|
292f84faa8 | ||
|
|
079d51f4af | ||
|
|
1c5a2ac628 | ||
|
|
82a4058cc3 | ||
|
|
e3736a8e33 | ||
|
|
3536716983 | ||
|
|
11ccb1c1c9 | ||
|
|
a6eba0d923 | ||
|
|
18f034762b | ||
|
|
bf07edbc33 | ||
|
|
bb9637041d | ||
|
|
0fdabef2da | ||
|
|
c49454ec8d | ||
|
|
ff8f42214b | ||
|
|
bd16b516e3 |
@@ -1,55 +1,69 @@
|
|||||||
|
# All non-assigned.
|
||||||
|
* @organicmaps/mergers
|
||||||
# Visual design.
|
# Visual design.
|
||||||
/android/app/src/main/res/drawable*/ @comaps/design
|
/android/app/src/main/res/drawable*/ @organicmaps/design
|
||||||
/android/app/src/main/res/font/ @comaps/design
|
/android/app/src/main/res/font/ @organicmaps/design
|
||||||
/android/app/src/main/res/mipmap*/ @comaps/design
|
/android/app/src/main/res/mipmap*/ @organicmaps/design
|
||||||
/data/*.ttf @comaps/design
|
/data/*.ttf @organicmaps/design
|
||||||
/data/resources-svg/ @comaps/design
|
/data/resources-svg/ @organicmaps/design
|
||||||
/data/search-icons/ @comaps/design
|
/data/search-icons/ @organicmaps/design
|
||||||
/iphone/Maps/Images.xcassets/ @comaps/design
|
/iphone/Maps/Images.xcassets/ @organicmaps/design
|
||||||
# Android.
|
# Android.
|
||||||
/android/ @comaps/android
|
/android/ @organicmaps/android
|
||||||
/android/app/src/main/java/app/comaps/car/ @comaps/android-auto
|
/android/app/src/main/java/app/organicmaps/car/ @organicmaps/android-auto
|
||||||
/docs/ANDROID_LOCATION_TEST.md @comaps/android
|
/docs/ANDROID_LOCATION_TEST.md @organicmaps/android
|
||||||
/docs/JAVA_STYLE.md @comaps/android
|
/docs/JAVA_STYLE.md @organicmaps/android
|
||||||
# no owner for translation changes
|
# no owner for translation changes
|
||||||
/android/app/src/main/res/values*/strings.xml
|
/android/app/src/main/res/values*/strings.xml
|
||||||
# iOS.
|
# iOS.
|
||||||
/iphone/ @comaps/ios
|
/iphone/ @organicmaps/ios
|
||||||
/xcode/ @comaps/ios
|
/xcode/ @organicmaps/ios
|
||||||
/docs/OBJC_STYLE.md @comaps/ios
|
/docs/OBJC_STYLE.md @organicmaps/ios
|
||||||
# no owner for translation changes
|
# no owner for translation changes
|
||||||
/iphone/plist.txt
|
/iphone/plist.txt
|
||||||
/iphone/Maps/LocalizedStrings/
|
/iphone/Maps/LocalizedStrings/
|
||||||
|
# Qt
|
||||||
|
/qt/ @organicmaps/qt
|
||||||
|
# Rendering
|
||||||
|
/drape/ @organicmaps/rendering
|
||||||
|
/drape_frontend/ @organicmaps/rendering
|
||||||
|
# Map Data.
|
||||||
|
/tools/python/maps_generator/ @organicmaps/data
|
||||||
|
/generator/ @organicmaps/data
|
||||||
|
/topography_generator/ @organicmaps/data
|
||||||
|
/data/borders/ @organicmaps/data
|
||||||
|
/data/conf/isolines/ @organicmaps/data
|
||||||
|
/docs/SUBWAY_GENERATION.md @organicmaps/data
|
||||||
|
/docs/MAPS.md @organicmaps/data
|
||||||
|
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @organicmaps/data
|
||||||
# no owner (changed often to add a new POI)
|
# no owner (changed often to add a new POI)
|
||||||
/generator/generator_tests/osm_type_test.cpp
|
/generator/generator_tests/osm_type_test.cpp
|
||||||
# Map Styles.
|
# Map Styles.
|
||||||
/data/styles/ @comaps/styles
|
/data/styles/ @organicmaps/styles
|
||||||
/data/types.txt @comaps/styles
|
/data/types.txt @organicmaps/styles
|
||||||
/data/visibility.txt @comaps/styles
|
/data/visibility.txt @organicmaps/styles
|
||||||
/data/mapcss-mapping.csv @comaps/styles
|
/data/mapcss-mapping.csv @organicmaps/styles
|
||||||
/data/replaced_tags.txt @comaps/styles
|
/data/replaced_tags.txt @organicmaps/styles
|
||||||
/data/classificator.txt @comaps/styles
|
/data/classificator.txt @organicmaps/styles
|
||||||
/data/drules_* @comaps/styles
|
/data/drules_* @organicmaps/styles
|
||||||
/docs/STYLES.md
|
/docs/STYLES.md
|
||||||
/tools/kothic/ @comaps/styles
|
/tools/kothic/ @organicmaps/styles
|
||||||
# DevOps.
|
# DevOps.
|
||||||
/.forgejo/workflows @comaps/devops
|
/.forgejo/workflows @organicmaps/devops
|
||||||
/android/*gradle* @comaps/devops
|
/android/*gradle* @organicmaps/devops
|
||||||
/docs/RELEASE_MANAGEMENT.md @comaps/devops
|
/docs/RELEASE_MANAGEMENT.md @organicmaps/devops
|
||||||
/xcode/fastlane/ @comaps/devops
|
/xcode/fastlane/ @organicmaps/devops
|
||||||
/tools/python/maps_generator/ @comaps/devops
|
# Growth.
|
||||||
/generator/ @comaps/devops
|
README.md @organicmaps/growth
|
||||||
/topography_generator/ @comaps/devops
|
/.forgejo/FUNDING.yml @organicmaps/growth
|
||||||
/data/borders/ @comaps/devops
|
/android/app/src/fdroid/play/ @organicmaps/growth
|
||||||
/data/conf/isolines/ @comaps/devops
|
/android/app/src/google/play/ @organicmaps/growth
|
||||||
/docs/SUBWAY_GENERATION.md @comaps/devops
|
/iphone/metadata/ @organicmaps/growth
|
||||||
/docs/MAPS.md @comaps/devops
|
|
||||||
/docs/EXPERIMENTAL_PUBLIC_TRANSPORT_SUPPORT.md @comaps/devops
|
|
||||||
# Legal.
|
# Legal.
|
||||||
LEGAL @comaps/admins
|
LEGAL @organicmaps/legal
|
||||||
LICENSE @comaps/admins
|
LICENSE @organicmaps/legal
|
||||||
NOTICE @comaps/admins
|
NOTICE @organicmaps/legal
|
||||||
CONTRIBUTORS @comaps/admins
|
CONTRIBUTORS @organicmaps/legal
|
||||||
/docs/CODE_OF_CONDUCT.md @comaps/admins
|
/docs/CODE_OF_CONDUCT.md @organicmaps/legal
|
||||||
/docs/DCO.md @comaps/admins
|
/docs/DCO.md @organicmaps/legal
|
||||||
/docs/GOVERNANCE.md @comaps/admins
|
/docs/GOVERNANCE.md @organicmaps/legal
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
open_collective: comaps
|
open_collective: comaps
|
||||||
liberapay: comaps
|
|
||||||
custom: ["https://comaps.app/donate/"]
|
|
||||||
|
|||||||
@@ -2,73 +2,38 @@ name: map-generator
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # Manual trigger
|
workflow_dispatch: # Manual trigger
|
||||||
inputs:
|
inputs:
|
||||||
map-generator-test:
|
jobs:
|
||||||
description: 'Test (non-prod) generation?'
|
description: 'Which job(s) to run right now?'
|
||||||
required: false
|
required: true
|
||||||
default: false
|
default: 'all-except-upload'
|
||||||
type: boolean
|
type: choice
|
||||||
# run-copy-coasts:
|
options:
|
||||||
# description: 'Copy last used coastlines?'
|
- all-except-upload
|
||||||
# required: false
|
- copy-coasts
|
||||||
# default: true
|
- planet
|
||||||
# type: boolean
|
- wiki
|
||||||
run-isolines:
|
- isolines
|
||||||
description: 'Update altitude isolines?'
|
- subways
|
||||||
required: false
|
- tiger
|
||||||
default: false
|
- maps
|
||||||
type: boolean
|
- upload
|
||||||
run-tiger:
|
|
||||||
description: 'Update TIGER address data?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
run-planet-pbf:
|
|
||||||
description: 'Update PBF planet (for Wiki & subways)?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
run-subways:
|
|
||||||
description: 'Update subways?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
run-wiki:
|
|
||||||
description: 'Update Wikipedia descriptions?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
run-planet-o5m:
|
|
||||||
description: 'Update O5M planet (for mapgen)?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
run-mapgen:
|
|
||||||
description: 'Run maps generation?'
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
map-generator-continue:
|
map-generator-continue:
|
||||||
description: 'Continue previous map generation?'
|
description: 'Continue previous map generation?'
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
# map-generator-countries:
|
map-generator-countries:
|
||||||
# description: 'Generate specific MWMs? (i.e. "US_New York_*, foo")'
|
description: 'Generate specific MWMs? (i.e. "US_New York_*, foo")'
|
||||||
# required: false
|
|
||||||
# type: string
|
|
||||||
run-upload:
|
|
||||||
description: 'Upload latest maps to CDN?'
|
|
||||||
required: false
|
required: false
|
||||||
default: false
|
type: string
|
||||||
type: boolean
|
reset:
|
||||||
# reset:
|
description: 'Reset part of the system?'
|
||||||
# description: 'Reset part of the system?'
|
required: false
|
||||||
# required: false
|
default: 'no'
|
||||||
# default: 'no'
|
type: choice
|
||||||
# type: choice
|
options:
|
||||||
# options:
|
- 'no'
|
||||||
# - 'no'
|
- wiki-ratelimit
|
||||||
# - wiki-ratelimit
|
|
||||||
|
|
||||||
## RCLONE_CONF is multi-line text containing keys and credentials for us2,ru1,fi1,de1 servers
|
## RCLONE_CONF is multi-line text containing keys and credentials for us2,ru1,fi1,de1 servers
|
||||||
|
|
||||||
@@ -78,9 +43,8 @@ env:
|
|||||||
WIKIMEDIA_PASSWORD: ${{ secrets.WIKIMEDIA_PASSWORD }}
|
WIKIMEDIA_PASSWORD: ${{ secrets.WIKIMEDIA_PASSWORD }}
|
||||||
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
|
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
|
||||||
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }}
|
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }}
|
||||||
MWMTEST: ${{ inputs.map-generator-test }}
|
|
||||||
MWMCONTINUE: ${{ inputs.map-generator-continue }}
|
MWMCONTINUE: ${{ inputs.map-generator-continue }}
|
||||||
# MWMCOUNTRIES: ${{ inputs.map-generator-countries }}
|
MWMCOUNTRIES: ${{ inputs.map-generator-countries }}
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
TZ: Etc/UTC
|
TZ: Etc/UTC
|
||||||
|
|
||||||
@@ -105,22 +69,24 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
|
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
|
||||||
cd ~
|
cd ~
|
||||||
git clone --depth 1 --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
git clone --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
||||||
- name: Checkout wikiparser repo
|
- name: Checkout wikiparser repo
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ~
|
cd ~
|
||||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/wikiparser.git
|
git clone https://codeberg.org/comaps/wikiparser.git
|
||||||
- name: Checkout subways repo
|
- name: Checkout subways repo
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd ~
|
cd ~
|
||||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git
|
git clone https://codeberg.org/comaps/subways.git
|
||||||
|
|
||||||
copy-coasts:
|
copy-coasts:
|
||||||
# if: inputs.run-copy-coasts
|
if: inputs.jobs == 'copy-coasts' || inputs.jobs == 'all-except-upload'
|
||||||
name: Copy Previously Generated Coasts
|
name: Copy Previously Generated Coasts
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
|
needs:
|
||||||
|
- clone-repos
|
||||||
container:
|
container:
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||||
volumes:
|
volumes:
|
||||||
@@ -140,7 +106,7 @@ jobs:
|
|||||||
|
|
||||||
echo "Before:"
|
echo "Before:"
|
||||||
ls -al /home/planet/latest_coasts*
|
ls -al /home/planet/latest_coasts*
|
||||||
# TODO: don't copy coasts from test generations
|
|
||||||
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.geom /home/planet/latest_coasts.geom
|
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.geom /home/planet/latest_coasts.geom
|
||||||
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.rawgeom /home/planet/latest_coasts.rawgeom
|
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.rawgeom /home/planet/latest_coasts.rawgeom
|
||||||
|
|
||||||
@@ -153,103 +119,12 @@ jobs:
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update-isolines:
|
update-planet:
|
||||||
if: inputs.run-isolines
|
if: inputs.jobs == 'planet' || inputs.jobs == 'all-except-upload'
|
||||||
name: Update Isolines
|
name: Update Planet
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
needs:
|
needs:
|
||||||
- clone-repos
|
- clone-repos
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
|
||||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
# TODO: we only need to update these if our SRTM or countries change
|
|
||||||
# TODO: after update, verify that sizable files exist: /home/planet/isolines/*.isolines
|
|
||||||
- name: Update Isolines
|
|
||||||
shell: bash
|
|
||||||
# TODO: preserve previous isolines version?
|
|
||||||
# TODO: cleanup the tmp-tiles dir after completion
|
|
||||||
run: |
|
|
||||||
cd ~/comaps/
|
|
||||||
./tools/unix/build_omim.sh -p ~ -R topography_generator_tool
|
|
||||||
rm -rf /home/planet/isolines/
|
|
||||||
mkdir /home/planet/isolines/
|
|
||||||
~/omim-build-relwithdebinfo/topography_generator_tool \
|
|
||||||
--profiles_path=./data/conf/isolines/isolines-profiles.json \
|
|
||||||
--countries_to_generate_path=./data/conf/isolines/countries-to-generate.json \
|
|
||||||
--tiles_isolines_out_dir=/home/planet/isolines/tmp-tiles/ \
|
|
||||||
--countries_isolines_out_dir=/home/planet/isolines/ \
|
|
||||||
--data_dir=./data/ \
|
|
||||||
--srtm_path=/home/planet/SRTM-patched-europe/ \
|
|
||||||
--threads=96
|
|
||||||
- name: Check isolines
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
NUMISO=$(ls -al /home/planet/isolines/*.isolines | wc -l)
|
|
||||||
echo "Found $NUMISO isolines"
|
|
||||||
if [ $NUMISO -lt 10 ]; then
|
|
||||||
echo "ERROR: Did generation fail?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Notify Zulip
|
|
||||||
run: |
|
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
|
||||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
|
||||||
--data-urlencode type=stream \
|
|
||||||
--data-urlencode 'to="DevOps"' \
|
|
||||||
--data-urlencode topic=codeberg-bot \
|
|
||||||
--data-urlencode 'content=Isolines are done!'
|
|
||||||
|
|
||||||
update-tiger:
|
|
||||||
if: inputs.run-tiger
|
|
||||||
name: Update TIGER
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
needs:
|
|
||||||
- clone-repos
|
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
|
||||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
- name: Build address_parser
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ~/comaps
|
|
||||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeCache.txt
|
|
||||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeFiles
|
|
||||||
./tools/unix/build_omim.sh -p ~ -R address_parser_tool
|
|
||||||
- name: Update TIGER from Nominatim
|
|
||||||
shell: bash
|
|
||||||
# TODO: use curl instead of wget2
|
|
||||||
run: |
|
|
||||||
# TODO: maybe remove old osm-planet/tiger first?
|
|
||||||
cd /home/planet/
|
|
||||||
mkdir -p tiger
|
|
||||||
wget2 https://nominatim.org/data/tiger-nominatim-preprocessed-latest.csv.tar.gz
|
|
||||||
cd ~/comaps
|
|
||||||
tar -xOzf /home/planet/tiger-nominatim-preprocessed-latest.csv.tar.gz | ~/omim-build-relwithdebinfo/address_parser_tool --output_path=/home/planet/tiger
|
|
||||||
|
|
||||||
update-planet-pbf:
|
|
||||||
if: inputs.run-planet-pbf
|
|
||||||
name: Update PBF Planet
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
container:
|
container:
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||||
volumes:
|
volumes:
|
||||||
@@ -272,13 +147,20 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "planet-latest.osm.pbf was found, raw download not required."
|
echo "planet-latest.osm.pbf was found, raw download not required."
|
||||||
fi
|
fi
|
||||||
- name: Update PBF Planet
|
- name: Update Planet
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd /home/planet/planet/
|
cd /home/planet/planet/
|
||||||
rm -f planet-latest-new.osm.pbf
|
rm -f planet-latest-new.osm.pbf
|
||||||
pyosmium-up-to-date planet-latest.osm.pbf -o planet-latest-new.osm.pbf -v --size 16384
|
pyosmium-up-to-date planet-latest.osm.pbf -o planet-latest-new.osm.pbf -v --size 16384
|
||||||
mv planet-latest-new.osm.pbf planet-latest.osm.pbf
|
mv planet-latest-new.osm.pbf planet-latest.osm.pbf
|
||||||
|
- name: Converting planet-latest.osm.pbf to planet.o5m
|
||||||
|
# TODO: better to run osmupdate (not convert) just before starting the maps jobs - for max fresh data.
|
||||||
|
run: |
|
||||||
|
echo "Starting..."
|
||||||
|
cd /home/planet/planet/
|
||||||
|
osmconvert -v --drop-author --drop-version --hash-memory=4000 planet-latest.osm.pbf -o=planet.o5m
|
||||||
|
echo "Done."
|
||||||
- name: Notify Zulip
|
- name: Notify Zulip
|
||||||
run: |
|
run: |
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||||
@@ -286,44 +168,10 @@ jobs:
|
|||||||
--data-urlencode type=stream \
|
--data-urlencode type=stream \
|
||||||
--data-urlencode 'to="DevOps"' \
|
--data-urlencode 'to="DevOps"' \
|
||||||
--data-urlencode topic=codeberg-bot \
|
--data-urlencode topic=codeberg-bot \
|
||||||
--data-urlencode 'content=PBF planet update is done!'
|
--data-urlencode 'content=Planet update is done!'
|
||||||
|
|
||||||
update-subways:
|
|
||||||
if: inputs.run-subways
|
|
||||||
name: Update Subways
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
needs:
|
|
||||||
- clone-repos
|
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
|
||||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
- name: Update Subways
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ~/comaps/
|
|
||||||
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
|
||||||
./tools/unix/maps/generate_subways.sh
|
|
||||||
- name: Notify Zulip
|
|
||||||
run: |
|
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
|
||||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
|
||||||
--data-urlencode type=stream \
|
|
||||||
--data-urlencode 'to="DevOps"' \
|
|
||||||
--data-urlencode topic=codeberg-bot \
|
|
||||||
--data-urlencode 'content=Subways are done!'
|
|
||||||
|
|
||||||
wiki-update:
|
wiki-update:
|
||||||
if: inputs.run-wiki
|
if: inputs.jobs == 'wiki' || inputs.jobs == 'all-except-upload'
|
||||||
name: Update Wikipedia
|
name: Update Wikipedia
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
needs:
|
needs:
|
||||||
@@ -430,10 +278,12 @@ jobs:
|
|||||||
--data-urlencode topic=codeberg-bot \
|
--data-urlencode topic=codeberg-bot \
|
||||||
--data-urlencode 'content=Wiki update is done!'
|
--data-urlencode 'content=Wiki update is done!'
|
||||||
|
|
||||||
update-planet-o5m:
|
update-isolines:
|
||||||
if: inputs.run-planet-o5m
|
if: inputs.jobs == 'isolines' || inputs.jobs == 'all-except-upload'
|
||||||
name: Update O5M Planet
|
name: Update Isolines
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
|
needs:
|
||||||
|
- clone-repos
|
||||||
container:
|
container:
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||||
volumes:
|
volumes:
|
||||||
@@ -443,32 +293,38 @@ jobs:
|
|||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- name: Check for O5M Planet File
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: "~"
|
||||||
|
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
# TODO: we only need to update these if our SRTM or countries change
|
||||||
|
# TODO: after update, verify that sizable files exist: /home/planet/isolines/*.isolines
|
||||||
|
- name: Update Isolines
|
||||||
|
shell: bash
|
||||||
|
# TODO: preserve previous isolines version?
|
||||||
|
# TODO: cleanup the tmp-tiles dir after completion
|
||||||
|
run: |
|
||||||
|
cd ~/comaps/
|
||||||
|
./tools/unix/build_omim.sh -p ~ -R topography_generator_tool
|
||||||
|
rm -rf /home/planet/isolines/
|
||||||
|
mkdir /home/planet/isolines/
|
||||||
|
~/omim-build-relwithdebinfo/topography_generator_tool \
|
||||||
|
--profiles_path=./data/conf/isolines/isolines-profiles.json \
|
||||||
|
--countries_to_generate_path=./data/conf/isolines/countries-to-generate.json \
|
||||||
|
--tiles_isolines_out_dir=/home/planet/isolines/tmp-tiles/ \
|
||||||
|
--countries_isolines_out_dir=/home/planet/isolines/ \
|
||||||
|
--data_dir=./data/ \
|
||||||
|
--srtm_path=/home/planet/SRTM-patched-europe/ \
|
||||||
|
--threads=96
|
||||||
|
- name: Check isolines
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ ! -f /home/planet/planet/planet.o5m ]; then
|
NUMISO=$(ls -al /home/planet/isolines/*.isolines | wc -l)
|
||||||
echo "WARN: No file at /home/planet/planet/planet.o5m"
|
echo "Found $NUMISO isolines"
|
||||||
|
if [ $NUMISO -lt 10 ]; then
|
||||||
if [ ! -f /home/planet/planet/planet-latest.osm.pbf ]; then
|
echo "ERROR: Did generation fail?"
|
||||||
echo "ERROR: No file at /home/planet/planet/planet-latest.osm.pbf"
|
|
||||||
ls -al /home/planet/
|
|
||||||
ls -al /home/planet/planet/
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Converting planet-latest.osm.pbf to planet.o5m"
|
|
||||||
cd /home/planet/planet/
|
|
||||||
osmconvert -v --drop-author --drop-version --hash-memory=4000 planet-latest.osm.pbf -o=planet.o5m
|
|
||||||
echo "Conversion is done."
|
|
||||||
fi
|
|
||||||
- name: Update O5M planet
|
|
||||||
run: |
|
|
||||||
echo "Starting..."
|
|
||||||
cd /home/planet/planet/
|
|
||||||
rm -f planet-new.o5m
|
|
||||||
osmupdate -v --drop-author --drop-version --hash-memory=4000 --max-merge=32 --out-o5m planet.o5m planet-new.o5m
|
|
||||||
mv planet-new.o5m planet.o5m
|
|
||||||
echo "Done."
|
|
||||||
- name: Notify Zulip
|
- name: Notify Zulip
|
||||||
run: |
|
run: |
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||||
@@ -476,10 +332,81 @@ jobs:
|
|||||||
--data-urlencode type=stream \
|
--data-urlencode type=stream \
|
||||||
--data-urlencode 'to="DevOps"' \
|
--data-urlencode 'to="DevOps"' \
|
||||||
--data-urlencode topic=codeberg-bot \
|
--data-urlencode topic=codeberg-bot \
|
||||||
--data-urlencode 'content=O5M planet update is done!'
|
--data-urlencode 'content=Isolines are done!'
|
||||||
|
|
||||||
|
update-subways:
|
||||||
|
if: inputs.jobs == 'subways' || inputs.jobs == 'all-except-upload'
|
||||||
|
name: Update Subways
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
needs:
|
||||||
|
- clone-repos
|
||||||
|
container:
|
||||||
|
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||||
|
volumes:
|
||||||
|
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||||
|
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: "~"
|
||||||
|
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
- name: Update Subways
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd ~/comaps/
|
||||||
|
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
||||||
|
./tools/unix/maps/generate_subways.sh
|
||||||
|
- name: Notify Zulip
|
||||||
|
run: |
|
||||||
|
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||||
|
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
||||||
|
--data-urlencode type=stream \
|
||||||
|
--data-urlencode 'to="DevOps"' \
|
||||||
|
--data-urlencode topic=codeberg-bot \
|
||||||
|
--data-urlencode 'content=Subways are done!'
|
||||||
|
|
||||||
|
update-tiger:
|
||||||
|
if: inputs.jobs == 'tiger' || inputs.jobs == 'all-except-upload'
|
||||||
|
name: Update TIGER
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
needs:
|
||||||
|
- clone-repos
|
||||||
|
container:
|
||||||
|
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||||
|
volumes:
|
||||||
|
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||||
|
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: "~"
|
||||||
|
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
- name: Build address_parser
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd ~/comaps
|
||||||
|
#rm -rf ~/omim-build-relwithdebinfo/CMakeCache.txt
|
||||||
|
#rm -rf ~/omim-build-relwithdebinfo/CMakeFiles
|
||||||
|
./tools/unix/build_omim.sh -p ~ -R address_parser_tool
|
||||||
|
- name: Update TIGER from Nominatim
|
||||||
|
shell: bash
|
||||||
|
# TODO: use curl instead of wget2
|
||||||
|
run: |
|
||||||
|
# TODO: maybe remove old osm-planet/tiger first?
|
||||||
|
cd /home/planet/
|
||||||
|
mkdir -p tiger
|
||||||
|
wget2 https://nominatim.org/data/tiger-nominatim-preprocessed-latest.csv.tar.gz
|
||||||
|
cd ~/comaps
|
||||||
|
tar -xOzf /home/planet/tiger-nominatim-preprocessed-latest.csv.tar.gz | ~/omim-build-relwithdebinfo/address_parser_tool --output_path=/home/planet/tiger
|
||||||
|
|
||||||
generate-maps:
|
generate-maps:
|
||||||
if: inputs.run-mapgen
|
if: inputs.jobs == 'maps' || inputs.jobs == 'all-except-upload'
|
||||||
name: Generate Maps
|
name: Generate Maps
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
needs:
|
needs:
|
||||||
@@ -528,7 +455,7 @@ jobs:
|
|||||||
--data-urlencode 'content=Generator is done!'
|
--data-urlencode 'content=Generator is done!'
|
||||||
|
|
||||||
upload-maps:
|
upload-maps:
|
||||||
if: inputs.run-upload
|
if: inputs.jobs == 'upload'
|
||||||
name: Upload Maps
|
name: Upload Maps
|
||||||
runs-on: mapfilemaker
|
runs-on: mapfilemaker
|
||||||
container:
|
container:
|
||||||
@@ -540,10 +467,6 @@ jobs:
|
|||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
- name: Write config file
|
- name: Write config file
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.config/rclone/
|
mkdir -p ~/.config/rclone/
|
||||||
@@ -575,3 +498,4 @@ jobs:
|
|||||||
--data-urlencode topic=codeberg-bot \
|
--data-urlencode topic=codeberg-bot \
|
||||||
--data-urlencode 'content=Upload is done!'
|
--data-urlencode 'content=Upload is done!'
|
||||||
|
|
||||||
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
name: process_subways
|
|
||||||
on:
|
|
||||||
workflow_dispatch: # Manual trigger
|
|
||||||
|
|
||||||
env:
|
|
||||||
PLANET: /home/planet/planet/planet.o5m
|
|
||||||
TMPDIR: /tmp
|
|
||||||
HTML_DIR: "/mnt/4tbexternal/osm-planet/subway/validator"
|
|
||||||
DUMP: "$HTML_DIR"
|
|
||||||
SKIP_PLANET_UPDATE: "1"
|
|
||||||
DEBIAN_FRONTEND: nonnteractive
|
|
||||||
TZ: Etc/UTC
|
|
||||||
|
|
||||||
# /var/www/html/subways is mapped as a volume on cdn-fi-1
|
|
||||||
# as is /tmp/planet
|
|
||||||
jobs:
|
|
||||||
clone-repos:
|
|
||||||
name: Clone Git Repos
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal:/mnt/4tbexternal
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-process-subways-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
- name: Checkout subways repo
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ~
|
|
||||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git
|
|
||||||
|
|
||||||
update-planet-o5m:
|
|
||||||
name: Update O5M Planet
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
|
||||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-process-subways-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- name: Check for O5M Planet File
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ ! -f /home/planet/planet/planet.o5m ]; then
|
|
||||||
echo "WARN: No file at /home/planet/planet/planet.o5m"
|
|
||||||
|
|
||||||
if [ ! -f /home/planet/planet/planet-latest.osm.pbf ]; then
|
|
||||||
echo "ERROR: No file at /home/planet/planet/planet-latest.osm.pbf"
|
|
||||||
ls -al /home/planet/
|
|
||||||
ls -al /home/planet/planet/
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Converting planet-latest.osm.pbf to planet.o5m"
|
|
||||||
cd /home/planet/planet/
|
|
||||||
osmconvert -v --drop-author --drop-version --hash-memory=4000 planet-latest.osm.pbf -o=planet.o5m
|
|
||||||
echo "Conversion is done."
|
|
||||||
fi
|
|
||||||
- name: Update O5M planet
|
|
||||||
run: |
|
|
||||||
echo "Starting..."
|
|
||||||
cd /home/planet/planet/
|
|
||||||
rm -f planet-new.o5m
|
|
||||||
osmupdate -v --drop-author --drop-version --hash-memory=4000 --max-merge=32 --out-o5m planet.o5m planet-new.o5m
|
|
||||||
mv planet-new.o5m planet.o5m
|
|
||||||
echo "Done."
|
|
||||||
- name: Notify Zulip
|
|
||||||
run: |
|
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
|
||||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
|
||||||
--data-urlencode type=stream \
|
|
||||||
--data-urlencode 'to="DevOps"' \
|
|
||||||
--data-urlencode topic=codeberg-bot \
|
|
||||||
--data-urlencode 'content=O5M planet update is done!'
|
|
||||||
|
|
||||||
update-subways:
|
|
||||||
if: inputs.run-subways
|
|
||||||
name: Update Subways
|
|
||||||
runs-on: mapfilemaker
|
|
||||||
needs:
|
|
||||||
- clone-repos
|
|
||||||
container:
|
|
||||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
|
||||||
volumes:
|
|
||||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
|
||||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: "~"
|
|
||||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
|
||||||
- name: Update Subways
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ~/comaps/
|
|
||||||
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
|
||||||
./tools/unix/maps/generate_subways.sh
|
|
||||||
- name: Compare with VK validation
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ~/subways
|
|
||||||
if [ -f "$HTML_DIR/index.html" ]; then
|
|
||||||
echo "Comparing local validation with VK's validation..."
|
|
||||||
python3 ./scripts/compare_html_validation.py "$HTML_DIR/index.html" \
|
|
||||||
--vk-url "https://maps.vk.com/osm/tools/subways/latest/index.html"
|
|
||||||
else
|
|
||||||
echo "Local index.html not found at $HTML_DIR/index.html"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Notify Zulip
|
|
||||||
run: |
|
|
||||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
|
||||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
|
||||||
--data-urlencode type=stream \
|
|
||||||
--data-urlencode 'to="DevOps"' \
|
|
||||||
--data-urlencode topic=codeberg-bot \
|
|
||||||
--data-urlencode 'content=Subways are done!'
|
|
||||||
3
.github/FUNDING.yml
vendored
@@ -1,3 +0,0 @@
|
|||||||
open_collective: comaps
|
|
||||||
liberapay: comaps
|
|
||||||
custom: ["https://comaps.app/donate/"]
|
|
||||||
6
.github/workflows/android-check.yaml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
pip install "protobuf<3.21" --break-system-packages
|
pip install "protobuf<3.21" --break-system-packages
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 200 # enough to get all commits for the current day
|
fetch-depth: 200 # enough to get all commits for the current day
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ jobs:
|
|||||||
./gradlew -P${{ matrix.arch }} assemble${{ matrix.flavor }}
|
./gradlew -P${{ matrix.arch }} assemble${{ matrix.flavor }}
|
||||||
|
|
||||||
- name: Upload ${{ matrix.flavor }} apk
|
- name: Upload ${{ matrix.flavor }} apk
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: android-${{ matrix.flavor }}
|
name: android-${{ matrix.flavor }}
|
||||||
path: android/app/build/outputs/apk/**/CoMaps-*.apk
|
path: android/app/build/outputs/apk/**/CoMaps-*.apk
|
||||||
|
|||||||
13
.github/workflows/ios-check.yaml
vendored
@@ -8,14 +8,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
ios-check:
|
ios-check:
|
||||||
name: Build iOS
|
name: Build iOS
|
||||||
runs-on: macos-26
|
runs-on: macos-15
|
||||||
env:
|
env:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_26.1.app/Contents/Developer
|
DEVELOPER_DIR: /Applications/Xcode_26.app/Contents/Developer
|
||||||
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
||||||
LANGUAGE: en_US.UTF-8
|
LANGUAGE: en_US.UTF-8
|
||||||
LC_ALL: en_US.UTF-8
|
LC_ALL: en_US.UTF-8
|
||||||
TEST_RESULTS_BUNDLE_NAME: CoMaps-Test-Results
|
TEST_RESULTS_BUNDLE_NAME: CoMaps-Test-Results
|
||||||
SIMULATOR_DEVICE: 'iPhone 17 Pro Max'
|
SIMULATOR_DEVICE: 'iPhone 16 Pro Max'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -31,11 +31,8 @@ jobs:
|
|||||||
brew install qt \
|
brew install qt \
|
||||||
optipng
|
optipng
|
||||||
pip3 install "protobuf<3.21" --break-system-packages
|
pip3 install "protobuf<3.21" --break-system-packages
|
||||||
xcodebuild -downloadComponent metalToolchain
|
|
||||||
xcodebuild -downloadPlatform iOS
|
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Parallel submodules checkout
|
- name: Parallel submodules checkout
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -45,7 +42,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./configure.sh
|
run: ./configure.sh
|
||||||
|
|
||||||
- name: Configure Xcode cache
|
- name: Configure XCode cache
|
||||||
uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
with:
|
with:
|
||||||
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.buildType }}-${{ github.sha }}
|
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.buildType }}-${{ github.sha }}
|
||||||
|
|||||||
6
.gitignore
vendored
@@ -155,8 +155,6 @@ android/huawei-appgallery.json
|
|||||||
android/res/xml/network_security_config.xml
|
android/res/xml/network_security_config.xml
|
||||||
./server/
|
./server/
|
||||||
iphone/Maps/app.omaps/
|
iphone/Maps/app.omaps/
|
||||||
# Generated file
|
|
||||||
libs/indexer/localized_types_map.cpp
|
|
||||||
|
|
||||||
*.li
|
*.li
|
||||||
|
|
||||||
@@ -190,6 +188,10 @@ tools/python/maps_generator/var/etc/map_generator.ini
|
|||||||
tools/python/routing/etc/*.ini
|
tools/python/routing/etc/*.ini
|
||||||
tools/unix/maps/settings.sh
|
tools/unix/maps/settings.sh
|
||||||
|
|
||||||
|
# Helpers
|
||||||
|
/node_modules/
|
||||||
|
/package-lock.json
|
||||||
|
|
||||||
# Visual Studio
|
# Visual Studio
|
||||||
.vs
|
.vs
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ else()
|
|||||||
add_compile_options(-ffast-math $<$<CXX_COMPILER_ID:GNU>:-Wno-psabi>)
|
add_compile_options(-ffast-math $<$<CXX_COMPILER_ID:GNU>:-Wno-psabi>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Needed for std::execution::par
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
add_compile_options(-fexperimental-library)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (PLATFORM_WIN)
|
if (PLATFORM_WIN)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DWIN32_LEAN_AND_MEAN
|
-DWIN32_LEAN_AND_MEAN
|
||||||
@@ -114,8 +119,35 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
|||||||
add_compile_options(-fno-omit-frame-pointer)
|
add_compile_options(-fno-omit-frame-pointer)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Linux GCC LTO plugin fix.
|
||||||
|
if (PLATFORM_LINUX AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE MATCHES "^Rel"))
|
||||||
|
# To force errors if LTO was not enabled.
|
||||||
|
add_compile_options(-fno-fat-lto-objects)
|
||||||
|
# To fix ar and ranlib "plugin needed to handle lto object".
|
||||||
|
string(REGEX MATCH "[0-9]+" GCC_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION})
|
||||||
|
file(GLOB_RECURSE plugin /usr/lib/gcc/*/${GCC_MAJOR_VERSION}*/liblto_plugin.so)
|
||||||
|
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||||
|
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||||
|
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||||
|
|
||||||
|
if (PLATFORM_LINUX OR PLATFORM_ANDROID)
|
||||||
|
find_program(LLD_FOUND ld.lld)
|
||||||
|
if (LLD_FOUND)
|
||||||
|
message(STATUS "Using ld.lld linker")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=lld")
|
||||||
|
else()
|
||||||
|
find_program(GOLD_FOUND ld.gold)
|
||||||
|
if (GOLD_FOUND)
|
||||||
|
message(STATUS "Using ld.gold")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT SKIP_TESTS)
|
if (NOT SKIP_TESTS)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
# Enables ctest -T memcheck with valgrind
|
# Enables ctest -T memcheck with valgrind
|
||||||
@@ -195,9 +227,6 @@ if (PLATFORM_DESKTOP AND NOT WITH_SYSTEM_PROVIDED_3PARTY)
|
|||||||
include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include")
|
include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Fix for #include <boost/regex.hpp>
|
|
||||||
include_directories("${OMIM_ROOT}/3party/boost")
|
|
||||||
|
|
||||||
# Used in qt/ and shaders/
|
# Used in qt/ and shaders/
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
This file contains a list of people who have contributed to this project.
|
This file contains a list of people who have contributed to this project.
|
||||||
It is not necessarily comprehensive as contributors must manually add themselves.
|
Its not neccesarily comprehensive.
|
||||||
Feel free to add yourself here along with your first contribution!
|
Feel free to add yourself here along with your first contribution!
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
CoMaps contributors:
|
CoMaps contributors:
|
||||||
(in alphabetical order)
|
(in alphabetic order)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Bastian Greshake Tzovaras
|
Bastian Greshake Tzovaras
|
||||||
clover sage
|
clover sage
|
||||||
Harry Bond <me@hbond.xyz>
|
Harry Bond <me@hbond.xyz>
|
||||||
NoelClick
|
|
||||||
thesupertechie
|
|
||||||
vikiawv
|
vikiawv
|
||||||
Yannik Bloscheck
|
Yannik Bloscheck
|
||||||
|
|
||||||
|
|||||||
2
NOTICE
@@ -1,6 +1,6 @@
|
|||||||
Copyright 2020 My.com B.V. (Mail.Ru Group)
|
Copyright 2020 My.com B.V. (Mail.Ru Group)
|
||||||
Copyright 2025 Organic Maps Contributors
|
Copyright 2025 Organic Maps Contributors
|
||||||
Copyright 2026 CoMaps Contributors
|
Copyright 2025 CoMaps Contributors
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|||||||
17
SECURITY.md
@@ -1,17 +0,0 @@
|
|||||||
## Reporting Vulnerabilities
|
|
||||||
You can report a security vulnerability by creating an issue or send mail to security@comaps.app
|
|
||||||
|
|
||||||
## Verifying Fingerprints
|
|
||||||
|
|
||||||
To [verify](https://developer.android.com/studio/command-line/apksigner#usage-verify) the APK, use the following signing certificate fingerprints:
|
|
||||||
```
|
|
||||||
SHA-256: 4894e8e6963627ef660031d8593fe77297f835acb4e23810003e926135023b4c
|
|
||||||
SHA-1: 8b7b5739f917e9f7c681671ced0c9c8562123ade
|
|
||||||
MD5: 9cce0ffea281dc2f0e0a154d6d2e281e
|
|
||||||
```
|
|
||||||
|
|
||||||
To verify CoMaps via [AppVerifier](https://github.com/soupslurpr/AppVerifier), use the following signing certificate fingerprint:
|
|
||||||
```
|
|
||||||
app.comaps
|
|
||||||
48:94:E8:E6:96:36:27:EF:66:00:31:D8:59:3F:E7:72:97:F8:35:AC:B4:E2:38:10:00:3E:92:61:35:02:3B:4C
|
|
||||||
```
|
|
||||||
@@ -351,8 +351,6 @@ dependencies {
|
|||||||
implementation libs.androidx.recyclerview
|
implementation libs.androidx.recyclerview
|
||||||
implementation libs.androidx.work.runtime
|
implementation libs.androidx.work.runtime
|
||||||
implementation libs.androidx.lifecycle.process
|
implementation libs.androidx.lifecycle.process
|
||||||
implementation libs.androidx.documentfile
|
|
||||||
// 1.13 Material library version doesn't render properly alpha properties on map buttons
|
|
||||||
implementation libs.android.material
|
implementation libs.android.material
|
||||||
// Fix for app/organicmaps/util/FileUploadWorker.java:14: error: cannot access ListenableFuture
|
// Fix for app/organicmaps/util/FileUploadWorker.java:14: error: cannot access ListenableFuture
|
||||||
// https://github.com/organicmaps/organicmaps/issues/6106
|
// https://github.com/organicmaps/organicmaps/issues/6106
|
||||||
@@ -379,7 +377,6 @@ play {
|
|||||||
track.set('production')
|
track.set('production')
|
||||||
defaultToAppBundles.set(true)
|
defaultToAppBundles.set(true)
|
||||||
releaseStatus.set(ReleaseStatus.IN_PROGRESS)
|
releaseStatus.set(ReleaseStatus.IN_PROGRESS)
|
||||||
userFraction.set(0.2d) // Rollout to 20% of users
|
|
||||||
serviceAccountCredentials.set(file('google-play.json'))
|
serviceAccountCredentials.set(file('google-play.json'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
Una aplicació de mapes gratuïta i de codi obert dirigida per la comunitat basada en dades d'OpenStreetMap i reforçada amb el compromís amb la transparència, la privadesa i la no ànim de lucre. CoMaps és una derivació/fork d'Organic Maps, que al seu torn és una derivació de Maps.ME.
|
|
||||||
|
|
||||||
Llegiu sobre els motius del projecte i la seva direcció a <b><i>codeberg.org/comaps</i></b>.
|
|
||||||
Uneix-te a la comunitat i ajuda a crear la millor aplicació de mapes
|
|
||||||
• Utilitza l'aplicació i difon-la
|
|
||||||
• Dona comentaris i informa de problemes
|
|
||||||
• Actualitza les dades del mapa a l'aplicació o al lloc web d'OpenStreetMap
|
|
||||||
|
|
||||||
‣ <b>Enfocat fora de línia</b>: Planifica i navega pel teu viatge a l'estranger sense necessitat de servei mòbil, cerca punts de referència mentre fas una excursió llunyana, etc. Totes les funcions de l'aplicació estan dissenyades per funcionar fora de línia.
|
|
||||||
‣ <b>Respecte a la privadesa</b>: L'aplicació està dissenyada tenint en compte la privadesa: no identifica persones, no fa seguiment i no recopila informació personal. Sense anuncis.
|
|
||||||
‣ <b>Senzill i polit</b>: funcions essencials fàcils d'utilitzar que simplement funcionen.
|
|
||||||
‣ <b>Estalvia bateria i espai</b>: No consumeix bateria com altres aplicacions de navegació. Els mapes compactes estalvien espai preciós al telèfon.
|
|
||||||
‣ <b>Gratuït i creat per la comunitat</b>: Gent com tu ha ajudat a crear l'aplicació afegint llocs a OpenStreetMap, provant i donant comentaris sobre les funcions i aportant les seves habilitats de desenvolupament i diners.
|
|
||||||
‣ <b>Presa de decisions i finances obertes i transparents, sense ànim de lucre i de codi obert.</b>
|
|
||||||
|
|
||||||
<b>Característiques principals</b>:
|
|
||||||
• Mapes detallats descarregables amb llocs que no estan disponibles amb Google Maps
|
|
||||||
• Mode exterior amb rutes de senderisme destacades, càmpings, fonts d'aigua, pics, corbes de nivell, etc.
|
|
||||||
• Senders per caminar i carrils bici
|
|
||||||
• Punts d'interès com restaurants, gasolineres, hotels, botigues, llocs d'interès i molts més
|
|
||||||
• Cerca per nom, adreça o categoria de punt d'interès
|
|
||||||
• Navegació amb anuncis de veu per caminar, anar amb bicicleta o conduir
|
|
||||||
• Marca els teus llocs preferits amb un sol toc
|
|
||||||
• Articles de la Viquipèdia fora de línia
|
|
||||||
• Capa i indicacions de trànsit de metro
|
|
||||||
• Enregistrament de rutes
|
|
||||||
• Exporta i importa marcadors i rutes en formats KML, KMZ i GPX
|
|
||||||
• Un mode fosc per utilitzar durant la nit
|
|
||||||
• Millora les dades del mapa per a tothom mitjançant un editor bàsic integrat
|
|
||||||
|
|
||||||
<b>La llibertat és aquí</b>
|
|
||||||
Descobreix el teu viatge, navega pel món amb la privadesa i la comunitat al capdavant!
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
En fællesskabdrevet og åben source kortapp, baseret på kortdata fra OpenStreetMap og styrket i forpligtelsen til værdierne gennemsigtighed, privatlivets fred, og non-profit. CoMaps udspringer af Organic Maps, som selv udsprang af Maps.ME.
|
|
||||||
|
|
||||||
Læs mere om grundlaget for projektet og dets udviklingsretnign på <b><i>codeberg.org/comaps</i></b>.
|
|
||||||
Slut dig til fælleskabet og hjælp til med at bygge den bedste kortapp i verden.
|
|
||||||
• Brug appen og fortæl andre om den
|
|
||||||
• Giv feedback anmeld fejl
|
|
||||||
• Opdater kortdata i appen eller på OpenStreetMap-hjemmesiden.
|
|
||||||
|
|
||||||
‣ <b>Offlinefokuseret</b>: Planlæg din rute og find vej i udlandet uden brug af mobildata, søg og find afsidesliggende mål på en afsidesliggende vandretur, mm. Alle funktioner er designet til at fungere uden internetforbindelse.
|
|
||||||
‣ <b>Respekt for privatlivets fred</b>: Appen er designet med henblik på at respektere dit privatliv – den identificerer dig ikke, indeholder ingen sporingsmekanismer, og insamler ingen personlig information. Appen er reklamefri.
|
|
||||||
‣ <b>Enkel og elegant</b>: de essentielle funktioner er nemme at bruge, og de virker bare.
|
|
||||||
‣ <b>Sparer på batteriet og på lagerpladsen</b>: Dræner ikke dit batteri hurtigt, som andre kortapps. De kompakte kortfiler minimerer varigt lagerpladsforbrug.
|
|
||||||
‣ <b>Gratis og bygget i fællesskab</b>: Folk som dig har hjulpet med denne app ved at tilføje steder til OpenStreetMap, ved at teste appens funktioner og give feedback på dem og ved at bidrage til udviklingen af appen med deres tid og penge.
|
|
||||||
‣ <b>Åben og gennemsigtig beslutningstagningsproces og finanser, non-profit, og fuldt ud åben source.</b>
|
|
||||||
|
|
||||||
<b>Hovedfunktioner</b>
|
|
||||||
• Hent detaljerede kort, der indeholder steder som ikke findes i mange kommericelle kort.
|
|
||||||
• En frilufts-tilstand med markede vandrestier, teltpladser, kilder, bjerg- og bakketoppe, højdekonturlinjer, mm.
|
|
||||||
• Gangstier og cykelstier
|
|
||||||
• Steder, der kan besøges, som f.eks. restauranter, tankstationer, hoteller, butikker, seværdigheder og mange andre.
|
|
||||||
• Søg efter stednavn, adresse, eller type af sted.
|
|
||||||
• Gem dine yndlingssteder som bogmærker med et enkelt tryk.
|
|
||||||
• iCloud synkronisering af bogmærker og optagede spor.
|
|
||||||
• Offline artikler fra Wikipedia.
|
|
||||||
• Metro-lag med navigation.
|
|
||||||
• Optagelse af spor.
|
|
||||||
• Eksport og import af bogmærker og spor i formaterne KML, KMZ og GPX.
|
|
||||||
• Mørk tilstand til brug om natten.
|
|
||||||
• Mulighed for at forbedre kortet vha. en indbygget editor.
|
|
||||||
• CarPlay understøttes.
|
|
||||||
|
|
||||||
<b>Friheden er ankommet</b>
|
|
||||||
Opdag din rejse, find vej i verden med privatliv og fællesskab i førersædet!
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
Eine von der Community betriebene, kostenlose Open-Source Karten-App, die auf OpenStreetMap Daten basiert. Transparent und nicht gewinnorientiert. CoMaps ist ein Fork/Abspaltung von Organic Maps, die wiederum ein Fork/Abspaltung von Maps.Me ist.
|
Eine von der Community betriebene, kostenlose Open-Source Karten-App, die auf OpenStreetMap Daten basiert. Transparent und nicht gewinnorientiert. CoMaps ist ein Fork/Abspaltung von Organic Maps, die wiederum ein Fork/Abspaltung von Maps.Me ist.
|
||||||
|
|
||||||
Lese mehr über die Gründe und Ziele des Projektes unter <b><i>codeberg.org/comaps</i></b> (auf Englisch).
|
Lese mehr über die Gründe und Ziele des Projektes unter <b><i>codeberg.org/comaps</i></b>.
|
||||||
Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
||||||
• Nutze die App und erzähle anderen davon
|
• Nutze die App und erzähle anderen davon
|
||||||
• Gib Feedback und melde Probleme
|
• Gib Feedback und melde Probleme
|
||||||
@@ -9,9 +9,9 @@ Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
|||||||
‣ <b>Einfach und ausgereift</b>: Essenzielle, leicht zu bedienende Funktionen, die einfach funktionieren.
|
‣ <b>Einfach und ausgereift</b>: Essenzielle, leicht zu bedienende Funktionen, die einfach funktionieren.
|
||||||
‣ <b>Offline-orientiert</b>: Plane und navigiere im Ausland ohne Mobilfunkverbindung, finde Wegpunkte auf abgelegenen Wanderungen usw. Alle Funktionen sind für den Offline-Einsatz konzipiert.
|
‣ <b>Offline-orientiert</b>: Plane und navigiere im Ausland ohne Mobilfunkverbindung, finde Wegpunkte auf abgelegenen Wanderungen usw. Alle Funktionen sind für den Offline-Einsatz konzipiert.
|
||||||
‣ <b>Datenschutzfreundlich</b>: Die App wurde mit Fokus auf Privatsphäre entwickelt – keine Personenidentifikation, kein Tracking, keine Erfassung persönlicher Daten, keine Werbung.
|
‣ <b>Datenschutzfreundlich</b>: Die App wurde mit Fokus auf Privatsphäre entwickelt – keine Personenidentifikation, kein Tracking, keine Erfassung persönlicher Daten, keine Werbung.
|
||||||
‣ <b>Spart Akku und Speicherplatz</b>: Verbraucht nicht unnötig viel Akku wie andere Navi-Apps. Kompakte Karten sparen Speicherplatz auf deinem Gerät.
|
‣ <b>Spart Akku und Speicherplatz</b>: Verbraucht nicht unnötig Akku wie andere Navi-Apps. Kompakte Karten sparen Speicherplatz auf deinem Gerät.
|
||||||
‣ <b>Kostenlos und von der Community entwickelt</b>: Menschen wie du haben geholfen, diese App zu entwickeln – durch das Hinzufügen von Orten zu OpenStreetMap, Testen von neuen Funktionen, Softwareentwicklung oder Spenden.
|
‣ <b>Kostenlos und von der Community entwickelt</b>: Menschen wie du haben geholfen, diese App zu entwickeln – durch das Hinzufügen von Orten zu OpenStreetMap, Testen von neuen Funktionen, Softwareentwicklung oder Spenden.
|
||||||
‣ <b>Offen und transparent bei Entscheidungen und Finanzen, gemeinnützig und vollständig Open-Source.</b>
|
‣ <b>Offen und transparent bei Entscheidungen und Finanzen, gemeinnützig und vollständig Open-Source</b>
|
||||||
|
|
||||||
<b>Hauptfunktionen</b>:
|
<b>Hauptfunktionen</b>:
|
||||||
• Detaillierte, herunterladbare Karten mit Orten, die bei Google Maps oft fehlen
|
• Detaillierte, herunterladbare Karten mit Orten, die bei Google Maps oft fehlen
|
||||||
@@ -28,5 +28,5 @@ Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
|||||||
• Dunkler Modus für die Nutzung bei Nacht
|
• Dunkler Modus für die Nutzung bei Nacht
|
||||||
• Kartenbearbeitung direkt in der App mit einem einfachen Editor
|
• Kartenbearbeitung direkt in der App mit einem einfachen Editor
|
||||||
|
|
||||||
<b>Freiheit beginnt hier</b>
|
<b>Entdecke die Unabhängigkeit</b>
|
||||||
Entdecke deine Reise, wobei Datenschutz und Gemeinschaft im Vordergrund stehen!
|
Entdecke deine Reise – navigiere in der Welt mit Datenschutz!
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
• OpenStreetMap Daten vom 17. Dezember
|
• OpenStreetMap-Daten vom 4. November
|
||||||
• Map download server nun wählbar
|
• Aktualisierte Karten-Icons, inkl. Farben für Unterhaltungs-, Sport- & andere Unternehmen
|
||||||
• Warnung über veraltete Karten hinzugefügt + Knopf zum updaten
|
• Informationen zu Steckdosen an EV-Ladestationen
|
||||||
• Vermeidung von Parkplatzwegen im Routing
|
• Symbole für Sportzentren, Veranstaltungsorte, Massagesalons, Gästehäuser und einige stillgelegte Unternehmen
|
||||||
• Neuer Zoombutton
|
• Verbesserungen bei der Suche
|
||||||
• Verbesserte Französchische Suchsynonme
|
• Behebung eines Absturzes bei der Suche
|
||||||
• OSM editor: Maximale Länge für OSM-Tags werden nun geprüft
|
• Verbesserte Sprachführung während der Navigation
|
||||||
Mehr auf codeberg.org/comaps/comaps/releases
|
Weitere Änderungen finden in unseren Codeberg-Versionshinweisen!
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Leichte Navigation – Erlebe mehr von deiner Reise – Community-unterstützt
|
Einfache Navigation - Entdecken Sie mehr von Ihrer Reise - Community-Entwickelt
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 636 KiB After Width: | Height: | Size: 628 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 532 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 454 KiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 268 KiB |
|
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 263 KiB |
@@ -1,8 +1,8 @@
|
|||||||
• OpenStreetMap data as of December 17
|
• OpenStreetMap data as of November 4
|
||||||
• Make map download server configurable
|
• Recategorized map icons including some new colors for entertainment, sports and other businesses
|
||||||
• Added info about outdated maps and an update button to the selected place info card
|
• Display info about available sockets on charging stations
|
||||||
• Avoid using parking aisles for routing
|
• Added bandstands, backless benches and loungers
|
||||||
• Changed shape of zoom buttons
|
• New icons for different sport centres, event venues, massage salons, guest houses and some disused businesses
|
||||||
• Improved French search synonyms
|
• Multiple search improvements and crash fix
|
||||||
• OSM editor: check length limit for OSM tags in value validation
|
• Improved voice guidance during navigation
|
||||||
More details on codeberg.org/comaps/comaps/releases
|
Check our Codeberg release notes for more changes!
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
Komunum-gvidata senpaga kaj malfermkoda mapapliko bazita sur OpenStreetMap-datumoj kaj fortigita per komitado al transparencio, privateco kaj ne-lucro. CoMaps estas forko/spin-off de Organic Maps, kiu turne estas forko de Maps.ME.
|
|
||||||
|
|
||||||
Legu plu pri la kialoj por la projekto kaj ĝia direkto ĉe <b><i>codeberg.org/comaps</i></b>.
|
|
||||||
Aliĝu al la komunumo tie kaj helpu fari la plej bonan mapaplikon
|
|
||||||
• Uzu la aplikon kaj disvastigu la vorton pri ĝi
|
|
||||||
• Donu rimarkojn kaj raportu problemojn
|
|
||||||
• Ĝisdatigu mapajn datumojn en la apliko aŭ sur la OpenStreetMap-retejo
|
|
||||||
|
|
||||||
‣ <b>Senkonekta-fokusa</b>: Planu kaj navigu vian vojaĝon eksterlande sen bezono de ĉelulara servico, serĉu vojpunktojn dum malproksima promenado, ktp. Ĉiuj funkcioj de la apliko estas dezajnitaj por funkcii senkonekte.
|
|
||||||
‣ <b>Rispektante Privatecon</b>: La apliko estas dezajnita kun privateco en menso — ne identigas homojn, ne sekvas, kaj ne kolektas personajn informojn. Sen reklamoj.
|
|
||||||
‣ <b>Simpla kaj Perfekta</b>: esencaj, facile uzeblaj funkcioj kiuj simple funkcias.
|
|
||||||
‣ <b>Konservas Vian Baterion kaj Spacon</b>: Ne elĉerpas vian baterion kiel aliaj navigaj aplikaĵoj. Kompaktaj mapoj konservas precian spacon sur via telefono.
|
|
||||||
‣ <b>Sena kaj Konstruita de la Komunumo</b>: Homoj kiel vi helpis konstrui la aplikon per aldonado de lokoj al OpenStreetMap, testado kaj donado de rimarkoj pri funkcioj kaj kontribuado de siaj programadaj kapabloj kaj mono.
|
|
||||||
‣ <b>Malferma kaj Transparenta Decidado kaj Financoj, Ne-lucra kaj Tute Malfermkoda.</b>
|
|
||||||
|
|
||||||
<b>Ĉefaj Funkcioj</b>:
|
|
||||||
• Elŝuteblaj detalegaj mapoj kun lokoj kiuj ne estas disponeblaj per Google Maps
|
|
||||||
• Eksteraj modo kun elstarigitaj promenaj vojoj, kampoj, akvofontoj, pintoj, konturlinioj, ktp
|
|
||||||
• Promenaj vojoj kaj biciklaj vojoj
|
|
||||||
• Interesaj punktoj kiel restoracioj, benzinstacioj, hoteloj, vendejoj, vidindaĵoj kaj multaj aliaj
|
|
||||||
• Serĉo laŭ nomo aŭ adreso aŭ laŭ kategorio de interesaj punktoj
|
|
||||||
• Navigado kun voĉaj anoncoj por promenado, biciklado aŭ veturado
|
|
||||||
• Marku viajn favorajn lokojn per unu tuŝo
|
|
||||||
• Senkonektaj Vikipedio-artikoloj
|
|
||||||
• Metroa transporta tavolo kaj indikoj
|
|
||||||
• Enregistraĵo de vojoj
|
|
||||||
• Eksporto kaj importo de markiloj kaj vojoj en KML, KMZ, GPX formatoj
|
|
||||||
• Malhela modo por uzi nokte
|
|
||||||
• Plibonigu mapajn datumojn por ĉiuj uzante bazan enkonstruitan redaktilon
|
|
||||||
|
|
||||||
<b>Libereco Estas Ĉi Tie</b>
|
|
||||||
Malkovru vian vojaĝon, navigu la mondon kun privateco kaj komunumo en la antaŭa plano!
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Facila mapnaviĝado - Malkovru pli de via vojaĝo - Subtenata de la komunumo
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CoMaps - Migru, Biciklu, Veturigu Eksterrete
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
• Datos OSM del 04/11
|
||||||
|
• Iconos del mapa recategorizados, incluyendo nuevos colores
|
||||||
|
• Visualización de información sobre enchufes disponibles en estaciones de recarga
|
||||||
|
• Adición de iconos para diferentes centros deportivos, lugares de eventos, salones de masajes, posadas y algunos establecimientos comerciales desactivados
|
||||||
|
• Varias mejoras y correcciones de errores en la búsqueda
|
||||||
|
• Mejora en la orientación por voz durante la navegación
|
||||||
|
Más detalles en Codeberg
|
||||||
|
Before Width: | Height: | Size: 605 KiB After Width: | Height: | Size: 655 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 532 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 452 KiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 460 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 263 KiB |
@@ -1,8 +1,8 @@
|
|||||||
• Données OpenStreetMap du 17 décembre
|
• Données OpenStreetMap au 4 novembre
|
||||||
• Serveur de téléchargement de cartes configurable
|
• Recatégorisation des icônes sur la carte avec ajout de nouvelles couleurs pour certains types de lieux
|
||||||
• Ajout d'un message d'avertissement pour les cartes trop anciennes
|
• Affichage des prises sur les bornes électriques
|
||||||
• Évitement des allées de parking dans les itinéraires
|
• Ajout d'icônes pour les centres sportifs, salles d'événements, salon de massage et autres lieux
|
||||||
• Mise à jour de l'apparence des boutons de zooms
|
• Multiple améliorations dans la recherche
|
||||||
• Amélioration des synonymes de recherche en français
|
• Correction d'un plantage dans la recherche
|
||||||
• Editeur OSM: vérification de la taille limite des tags OSM
|
• Amélioration de la synthèse vocale durant la navigation
|
||||||
Plus d'informations sur codeberg.org/comaps/comaps/releases
|
Plus d'informations sur notre Codeberg
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Randonnée, Vélo, Conduite hors ligne
|
CoMaps - Rando, vélo, conduite hors ligne & privée
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
Bendruomenės vystoma nemokama atvirojo kodo žemėlapių programa, pagrįsta „OpenStreetMap“ duomenimis ir sustiprinta įsipareigojimu užtikrinti skaidrumą, privatumą ir pelno nesiekimą. „CoMaps“ programa yra kilusi iš „Organic Maps“, o pastaroji – iš programos „Maps.ME“.
|
|
||||||
|
|
||||||
Apie šio projekto kilmę, jos priežastis ir palaikomą kryptį galite paskaityti adresu <b><i>codeberg.org/comaps</i></b>.
|
|
||||||
Prisijunkite prie bendruomenės ir padėkite sukurti geriausią žemėlapių programą
|
|
||||||
• Naudokitės programa ir paskleiskite žinią apie ją
|
|
||||||
• Teikite atsiliepimus ir praneškite apie problemas
|
|
||||||
• Atnaujinkite žemėlapių duomenis programoje arba „OpenStreetMap“ svetainėje
|
|
||||||
|
|
||||||
‣ <b>Skirta naudoti neprisijungus prie interneto</b>: planuokite maršrutus ir keliaukite užsienyje be mobiliojo ryšio, ieškokite kelionės taškų tolimuose žygiuose ir pan. Visos programos funkcijos yra pritaikytos veikti be interneto ryšio.
|
|
||||||
‣ <b>Gerbia privatumą</b>: programėlė sukurta, teikiant prioritetą privatumui: neidentifikuoja žmonių, neseka ir nerenka asmeninės informacijos. Be reklamų.
|
|
||||||
‣ <b>Paprasta ir išbaigta</b>: esminės, lengvai naudojamos funkcijos, kurios tiesiog veikia.
|
|
||||||
‣ <b>Taupo bateriją ir vietą</b>: neišsekina baterijos kaip kitos navigacijos programos. Kompaktiški žemėlapiai tausoja vietą jūsų telefone.
|
|
||||||
‣ <b>Nemokama ir kuriama bendruomenės</b>: paprasti žmonės – kaip jūs – padėjo sukurti šią programą, pildydami „OpenStreetMap“ žemėlapį, išbandydami ir pateikdami atsiliepimus apie funkcijas bei prisidėdami savo programavimo įgūdžiais ir pinigais.
|
|
||||||
‣ <b>Atviras ir skaidrus sprendimų priėmimas ir finansai, ne pelno siekianti ir visiškai atviro kodo programa.</b>
|
|
||||||
|
|
||||||
<b>Pagrindinės funkcijos</b>:
|
|
||||||
• Atsisiunčiami išsamūs žemėlapiai su vietomis, kurių nėra „Google Maps“;
|
|
||||||
• Žygių pėsčiomis veiksena su pažymėtais pėsčiųjų takais, stovyklavietėmis, vandens šaltiniais, kalnų viršūnėmis, reljefo linijomis ir kt.;
|
|
||||||
• Pėsčiųjų ir dviračių takai;
|
|
||||||
• Potencialūs kelionės taškai, kaip antai restoranai, degalinės, viešbučiai, parduotuvės, lankytinos vietos ir daugelis kitų;
|
|
||||||
• Paieška pagal pavadinimą, adresą arba lankytinos vietos kategoriją;
|
|
||||||
• Navigacija su balso instrukcijomis pėstiesiems, dviratininkams ir motorinio transporto vairuotojams;
|
|
||||||
• Mėgstamų vietų įsiminimas vienu bakstelėjimu;
|
|
||||||
• „Vikipedijos“ straipsniai, prieinami neprisijungus prie interneto;
|
|
||||||
• Kelionių metro sluoksnis ir maršrutai;
|
|
||||||
• Trasų įrašymas;
|
|
||||||
• Žymių ir trasų eksportavimas ir importavimas KML, KMZ, GPX formatais;
|
|
||||||
• Tamsaus žemėlapio veiksena, skirta naudoti naktį;
|
|
||||||
• Galimybė papildyti žemėlapio duomenis visiems, naudojantis įtaisytuoju baziniu redaktoriumi.
|
|
||||||
|
|
||||||
<b>Laisvė yra čia</b>
|
|
||||||
Atraskite savo kelionę ir keliaukite po pasaulį, kuriame privatumas ir bendruomenė yra svarbiausia!
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Paprasta ir patogi navigacija – Turiningesnės kelionės – Vystoma bendruomenės
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CoMaps – keliaukite atsijungę ir privačiai
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
• Dados OSM de 17/12
|
• Dados OSM de 04/11
|
||||||
• Servidor de download de mapas configurável
|
• Ícones do mapa recategorizados, incluindo novas cores
|
||||||
• Adição de informações sobre mapas desatualizados e um botão de atualização ao cartão de informações do local selecionado
|
• Exibição de informações sobre tomadas disponíveis em eletropostos
|
||||||
• Evita o uso de corredores de estacionamento para roteamento
|
• Adição de ícones para diferentes centros esportivos, locais de eventos, salões de massagem, pousadas e alguns estabelecimentos comerciais desativados
|
||||||
• Formato dos botões de zoom alterado
|
• Diversas melhorias e correção de erro na busca
|
||||||
• Sinônimos de busca em francês aprimorados
|
• Melhoria na orientação por voz durante a navegação
|
||||||
• Editor OSM: verificação do limite de comprimento das tags do OSM na validação de valores
|
Confira nossas notas de lançamento no Codeberg para mais detalhes!
|
||||||
Mais detalhes em codeberg.org/comaps/comaps/releases
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
Uma aplicação pela comunidade, grátis e ‘open-source’, de mapas baseada em dados do OpenStreetMap e reforçada com compromisso para transparência, privacidade e sem fins lucrativos. CoMaps é um fork/spin-off de Organic Maps, que, por sua vez, é um fork de Maps.ME
|
|
||||||
|
|
||||||
Leia sobre as razões deste projeto e a sua direção em <b><i>codeberg.org/comaps</i></b>.
|
|
||||||
Junte-se à comunidade e ajude a fazer a melhor aplicação de mapas
|
|
||||||
• Use a aplicação e partilhe-a com outros
|
|
||||||
• Dê ‘feedback’ e reporte problemas
|
|
||||||
• Atualize os dados de mapa na aplicação ou no site do OpenStreetMap
|
|
||||||
|
|
||||||
‣ <b>Simples e Polida</b>: funcionalidades essenciais fáceis que “somente funcionam”.
|
|
||||||
‣ <b>Foco Offline</b>: Planeie e navegue as suas viagens no estrangeiro sem dados móveis, procure locais numa caminhada distante, etc. Todas as funções da aplicação foram criadas com intenção de serem usadas sem internet.
|
|
||||||
‣ <b>Respeita a privacidade</b>: A aplicação foi criada com privacidade em mente — não identifica o utilizador, não rastreia, e não usa a sua informação pessoal. Sem anúncios.
|
|
||||||
‣ <b>Saves Your Battery and Space</b>: Não esgota a sua bateria ao contrário de outras aplicações. Mapas compactos salvam espaço no seu telemóvel.
|
|
||||||
‣ <b>Gratuita e Feita pela Comunidade</b>: Pessoas como si ajudam a criar a aplicação ao adicionar locais ao OpenStreetMap, testando e dando opiniões em funcionalidades e contribuindo com dotes de desenvolvimento e dinheiro.
|
|
||||||
‣ <b>Decisões e Finanças Abertas e Transparentes, Sem fins lucrativos e ‘Open-Source’.</b>
|
|
||||||
|
|
||||||
<b>Funcionalidades principais</b>:
|
|
||||||
• Mapas detalhados descarregáveis com locais que não estão disponíveis com o Google Maps
|
|
||||||
• Modo ao Ar Livre com trilhos de caminhada destacados, acampamentos, fontes de água, cumes, curvas de nível, etc
|
|
||||||
• Caminhos pedestres e ciclovias
|
|
||||||
• Pontos de interesse como restaurantes, estações de serviço, hotéis, lojas, atrações e muitos mais
|
|
||||||
• Pesquise por nome, endereço, ou por categoria de ponto de interesse
|
|
||||||
• Navegação com anúncios de voz ao caminhar, pedalar ou conduzir
|
|
||||||
• Marque os seus locais favoritos com um único clique
|
|
||||||
• Artigos da Wikipédia Offline
|
|
||||||
• Camada de metro e direções
|
|
||||||
• Gravação de Percursos
|
|
||||||
• Exportar e importar marcadores e percursos em formatos KML, KMZ, GPX
|
|
||||||
• Um modo escuro para usar durante a noite
|
|
||||||
• Melhore a informação do mapa para todos com um editor básico embebido
|
|
||||||
|
|
||||||
<b>A liberdade chegou</b>
|
|
||||||
Descubra a sua jornada, navegue o mundo com privacidade e a comunidade à frente!
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Navegação fácil nos mapas - Descubra mais sobre o seu percurso - Feito por todos
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CoMaps - Mapas e Navegação - Offline e Privada
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
• Карты OpenStreetMap от 17 декабря
|
• Карты OpenStreetMap от 4 ноября
|
||||||
• Возможность настройки сервера для скачивания карт
|
• Обновлены цвета иконок на карте, добавлены новые цвета для развлечений, спорта, некоторых бизнесов
|
||||||
• Добавлена информация об устаревании карт и кнопка обновления (при выборе места на карте)
|
• На зарядных станциях показываются имеющиеся типы разъёмов
|
||||||
• Парковочные проезды больше не используются для транзитной маршрутизации
|
• Добавлены эстрады, скамейки без спинок и лежаки
|
||||||
• Изменены кнопки масштабирования карты
|
• Новые иконки для разных спорт центров, массажных салонов, гостевых домов, некоторых закрытых бизнесов
|
||||||
• На карту добавлены ирригационные гидранты
|
• Несколько улучшений и исправлений в поиске
|
||||||
• Редактор OSM: проверка максимальной длины OSM тегов
|
• Улучшены голосовые подсказки при навигации
|
||||||
Подробнее на codeberg.org/comaps/comaps/releases
|
Подробнее смотрите на codeberg.org/comaps/comaps/releases
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
Brezplačno in odprtokodno zemljevidno orodje, ki ga vodi skupnost, temelji na podatkih OpenStreetMap in je okrepljena s predanostjo transparentnosti, zasebnosti in nepridobitnosti. CoMaps je izpeljanka OrganicMaps, ta pa je izpeljanka Maps.ME.
|
Brezplačno in odprtokodno zemljevidno orodje, ki ga vodi skupnost, temelji na podatkih OpenStreetMap in je okrepljena s predanostjo transparentnosti, zasebnosti in nedobičkonosnosti. CoMaps je izpeljanka OrganicMaps, ta pa je izpeljanka Maps.ME.
|
||||||
|
|
||||||
Preberite si o razlogih za ta projekt in njegovi usmerjenosti na <b><i>codeberg.org/comaps</i></b>.
|
Preverite si o razlogih za ta projekt in njegovi usmerjenosti na <b><i>codeberg.org/comaps</i></b>.
|
||||||
Pridružite se skupnosti in pomagajte narediti najboljše zemljevidno orodje
|
Pridružite se skupnosti in pomagajte narediti najboljše zemljevidno orodje
|
||||||
• Uporabljajte orodje in širite glas o njem
|
• Uporabljajte orodje in širite glas o njem
|
||||||
• Dajajte povratne informacije in poročajte o napakah
|
• Dajajte povratne informacije in poročajte o napakah
|
||||||
• Posodabljajte podatke zemljevida v tem orodju ali na spletni strani OpenStreetMap
|
• Posodabljajte podatke zemljevida v tem orodju ali na spletni strani OpenStreetMap
|
||||||
|
|
||||||
‣ <b>Osredotočeno na uporabo brez povezave</b>: Načrtujte in se usmerjajte na vašem potovanju v tujini vrez potrebe po mobilnih podatkih, iščite vmesne točke potovanja ko ste na daljšem pohodu ipd. Vse zmogljivosti orodja so zasnovane za delo brez povezave.
|
‣ <b>Osredotočeno na uporabo brez povezave</b>: Načrtujte in se usmerjajte na vašem potovanju v tujini vrez potrebe po mobilnih podatkih, iščite vmesne točke potocanja ko ste na daljšem pohodu ipd. Vse zmogljivosti orodja so zasnovane za delo brez povezave.
|
||||||
‣ <b>Spoštovanje zasebnosti</b>: orodje je zasnovano z mislijo na zasebnost – ne prepoznava oseb, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
‣ <b>Spoštovanje zasebnosti</b>: orodje je zasnovano z mislijo na zasebnost – ne prepoznava oseb, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
||||||
‣ <b>Preprosto in dodelano</b>: nujne zmogljivosti, enostavne za uporabo, ki preprosto delujejo.
|
‣ <b>Preprosto in dodelano</b>: nujne zmogljivosti, enostavne za uporabo, ki preprosto delujejo.
|
||||||
‣ <b>Prihrani vašo baterijo in prostor.</b>: ne izčrpava vaše baterije kakor druga usmerjevalna orodja. Strnjeni zemljevidi prihranijo dragocen prostor na vašem telefonu.
|
‣ <b>Prihrani vašo baterijo in prostor.</b>: ne izčrpava vaše baterije kakor druga usmerjevalna orodja. Strnjeni zemljevidi prihranijo dragocen prostor na vašem telefonu.
|
||||||
‣ <b>Brezplačno in ustvarjeno v skupnosti</b>: ljudje kot ste vi pomagajo ustvarjati to orodje, tako da dodajajo kraje na OpenStreetMap, preizkušajo in dajejo povratne informacije o zmogljivostih in prispevajo svoje razvijalske sposobnosti in sredstva.
|
‣ <b>Brezplačno in ustvarjeno v skupnosti</b>: ljudje kot ste vi pomagajo ustvarjati to orodje, tako da dodajajo kraje na OpenStreetMap, preizkušajo in dajejo povratne informacije o zmogljivostih in prispevajo svoje razvijalske sposobnosti in sredstva.
|
||||||
‣ <b>Odprto in transparentno odločanje in finance, nepridobitno in popolnoma odprtokodno.</b>
|
‣ <b>Odprto in transparentno odločanje in finance, nedobičkonosno in popolnoma odprtokodno.</b>
|
||||||
|
|
||||||
<b>Glavne zmogljivosti</b>:
|
<b>Glavne zmogljivosti</b>:
|
||||||
• Prenosljivi podrobni zemljevidi s kraji, ki na Googlovih zemljevidih niso na voljo.
|
• Prenosljivi podrobni zemljevidi s kraji, ki na Googlovoh zemljevidih niso na voljo.
|
||||||
• Prikaz za dejavnosti na prostem s poudarjenimi pohodniškimi potmi, tabornimi prostori, vodnimi viri, vrhovi, plastnicami itd.
|
• Prikaz za dejavnosti na prostem s poudarjenimi pohodniškimi potmi, tabornimi prostori, vodnimi viri, vrhovi, plastnicami itd.
|
||||||
• Pešpoti in kolesarke poti
|
• Pešpoti in kolesarke poti
|
||||||
• Kraji zanimanja, npr. restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in mnogo več
|
• Kraji zanimanja, npr. restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in mnogo več
|
||||||
• Iščite po imenu, hišnemu naslovu ali po vrsti
|
• Iščite po imenu, hišnemu naslovu ali po vrsti
|
||||||
• Usmerjanje z glasovnimi navodili za hojo, kolesarjenje ali vožnjo avtomobila.
|
• Usmerjanje z glasovnimi obvestili za hojo, kolesarjenje ali vožnjo avtomobila.
|
||||||
• Zaznamujte svoje najljubše kraje s preprostim dotikom
|
• Zaznamujte svoje najljubše kraje s preprostim dotikom
|
||||||
• Wikipedijini članki brez povezave
|
• Wikipedijini članki brez povezave
|
||||||
• Prometna plast podzemne železnice z usmerjanjem
|
• Prometna plast podzemne železnice z usmerjanjem
|
||||||
• Izvozite ali uvozite zaznamke in sledi v oblikah KML, KMZ, GPX
|
• Izvozite ali uvozite zaznamke in sledi v oblikah KML, KMZ, GPX
|
||||||
• Temni prikaz za uporabo ponoči
|
• Temni prikaz za uporabo ponoči
|
||||||
• Izboljšajte podatke zemljevida za vse z uporabo vgrajenega urejevalnika
|
• Izboljšajtw podatke zemljevida za vse z uporabo vgrajenega urejevalnika
|
||||||
|
|
||||||
<b>Svoboda je tu</b>
|
<b>Svoboda je tu</b>
|
||||||
Odkijte več o vašem potovanju, usmerjajte se po svetu s poudarkom na zasebnosti in skupnostnem delovanju!
|
Odkijte več o vašem potovanju, usmerjajte se po svetu s poudarkom na zasebnosti in skupnostnem delovanju!
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Enostavno usmerjanje – Odkrijte več o svojem potovanju – Podprto v skupnosti
|
Enostavno usmerjanje – Odkrij več o svojem potovanju – Podprto v skupnosti
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps – hodi in vozi brez povezave, zasebno
|
CoMaps–Hodi, kolesari, vozi brez povezave, zasebno
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
எளிய வழிகாட்டி - பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
எளிதான வரைபட வழிசெல் - உங்கள் பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
இணைவரைபடங்கள் - மலையேறு, வண்டி, தனிமையில் இயக்கு
|
|
||||||
@@ -3,7 +3,7 @@ Eine von der Community betriebene, kostenlose Open-Source Karten App, die auf Op
|
|||||||
Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
||||||
• Nutze die App und erzähle anderen davon
|
• Nutze die App und erzähle anderen davon
|
||||||
• Gib Feedback und melde Probleme
|
• Gib Feedback und melde Probleme
|
||||||
• Aktualisiere Kartendaten in der App oder auf der OpenStreetMap-Webseite
|
• Aktualisiere Kartendaten in der App oder auf der OpenStreetMap Website
|
||||||
|
|
||||||
<i>Dein Feedback und deine 5-Sterne-Bewertung sind die beste Unterstützung für uns!</i>
|
<i>Dein Feedback und deine 5-Sterne-Bewertung sind die beste Unterstützung für uns!</i>
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
|||||||
‣ <b>Datenschutz ist uns wichtig!</b>: Die App wurde mit Fokus auf Privatsphäre entwickelt – kein Tracking, keine Erfassung persönlicher Daten, keine Werbung.
|
‣ <b>Datenschutz ist uns wichtig!</b>: Die App wurde mit Fokus auf Privatsphäre entwickelt – kein Tracking, keine Erfassung persönlicher Daten, keine Werbung.
|
||||||
‣ <b>Spart Akku und Speicherplatz</b>: Verbraucht nicht unnötig Akku wie andere Navi-Apps. Kompakte Karten sparen Speicherplatz auf Deinem Gerät.
|
‣ <b>Spart Akku und Speicherplatz</b>: Verbraucht nicht unnötig Akku wie andere Navi-Apps. Kompakte Karten sparen Speicherplatz auf Deinem Gerät.
|
||||||
‣ <b>Kostenlos und von der Community entwickelt</b>: Menschen wie du haben geholfen, die App zu entwickeln – durch das Hinzufügen von Orten zu OpenStreetMap, Testen von neuen Funktionen, Softwareentwicklung oder Spenden.
|
‣ <b>Kostenlos und von der Community entwickelt</b>: Menschen wie du haben geholfen, die App zu entwickeln – durch das Hinzufügen von Orten zu OpenStreetMap, Testen von neuen Funktionen, Softwareentwicklung oder Spenden.
|
||||||
‣ <b>Offen und transparent bei Entscheidungen und Finanzen, gemeinnützig und vollständig Open Source.</b>
|
‣ <b>Offen und transparent bei Entscheidungen und Finanzen, gemeinnützig und vollständig Open Source</b>
|
||||||
|
|
||||||
<b>Hauptfunktionen</b>:
|
<b>Hauptfunktionen</b>:
|
||||||
• Detaillierte, herunterladbare Karten mit Orten, die bei Google Maps oft fehlen
|
• Detaillierte, herunterladbare Karten mit Orten, die bei Google Maps oft fehlen
|
||||||
@@ -24,13 +24,13 @@ Werde Teil der Community und hilf mit, die beste Karten-App zu entwickeln
|
|||||||
• Lesezeichen mit einem einzigen Tippen speichern
|
• Lesezeichen mit einem einzigen Tippen speichern
|
||||||
• Offline verfügbare Wikipedia-Artikel
|
• Offline verfügbare Wikipedia-Artikel
|
||||||
• U- und S-Bahn-Netze
|
• U- und S-Bahn-Netze
|
||||||
• Aufzeichnen von GPS-Tracks
|
• Aufzeichnen von GPS Tracks
|
||||||
• Import und Export von Favoriten und Routen im KML-, KMZ- oder GPX-Format
|
• Import und Export von Favoriten und Routen im KML-, KMZ- oder GPX-Format
|
||||||
• Dunkler Modus für die Nutzung bei Nacht
|
• Dunkler Modus für die Nutzung bei Nacht
|
||||||
• Kartenbearbeitung direkt in der App mit einem einfachen Editor
|
• Kartenbearbeitung direkt in der App mit einem einfachen Editor
|
||||||
• Unterstützung für Android Auto
|
• Unterstützung für Android Auto
|
||||||
|
|
||||||
Bitte melde Probleme, schlage neue Funktionen vor und werde Teil der Community auf unserer Website: <b><i>comaps.app/de/</i></b>
|
Bitte melde Probleme, schlage neue Funktionen vor und werde Teil der Community auf unserer Website: <b><i>comaps.app</i></b>
|
||||||
|
|
||||||
<b>Freiheit beginnt hier</b>
|
<b>Entdecke die Unabhängigkeit</b>
|
||||||
Entdecke deine Reise, wobei Datenschutz und Gemeinschaft im Vordergrund stehen!
|
Entdecke deine Reise – navigiere in der Welt mit Datenschutz!
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Leichte Navigation – Erlebe mehr von deiner Reise – Community-unterstützt
|
Einfache Navigation - Entdecken Sie mehr von Ihrer Reise - Community-Entwickelt
|
||||||
|
|||||||
@@ -68,4 +68,4 @@ Por favor, informa de errores, sugiere ideas y únete a nuestra comunidad en el
|
|||||||
|
|
||||||
<b>La Libertad Está Aquí</b>
|
<b>La Libertad Está Aquí</b>
|
||||||
|
|
||||||
¡Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad!
|
Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad.
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
Bendruomenės vystoma nemokama atvirojo kodo žemėlapių programa, pagrįsta „OpenStreetMap“ duomenimis ir sustiprinta įsipareigojimu užtikrinti skaidrumą, privatumą ir pelno nesiekimą.
|
|
||||||
|
|
||||||
Prisijunkite prie bendruomenės ir padėkite sukurti geriausią žemėlapių programą
|
|
||||||
• Naudokitės programa ir paskleiskite žinią apie ją
|
|
||||||
• Teikite atsiliepimus ir praneškite apie problemas
|
|
||||||
• Atnaujinkite žemėlapių duomenis programoje arba „OpenStreetMap“ svetainėje
|
|
||||||
|
|
||||||
<i>Jūsų atsiliepimai ir 5 žvaigždučių vertinimai yra geriausias palaikymas mums!</i>
|
|
||||||
|
|
||||||
‣ <b>Paprasta ir išbaigta</b>: esminės, lengvai naudojamos funkcijos, kurios tiesiog veikia.
|
|
||||||
‣ <b>Skirta naudoti neprisijungus prie interneto</b>: planuokite maršrutus ir keliaukite užsienyje be mobiliojo ryšio, ieškokite kelionės taškų tolimuose žygiuose ir pan. Visos programos funkcijos yra pritaikytos veikti be interneto ryšio.
|
|
||||||
‣ <b>Gerbia privatumą</b>: programėlė sukurta, teikiant prioritetą privatumui: neidentifikuoja žmonių, neseka ir nerenka asmeninės informacijos. Be reklamų.
|
|
||||||
‣ <b>Taupo bateriją ir vietą</b>: neišsekina baterijos kaip kitos navigacijos programos. Kompaktiški žemėlapiai tausoja vietą jūsų telefone.
|
|
||||||
‣ <b>Nemokama ir kuriama bendruomenės</b>: paprasti žmonės – kaip jūs – padėjo sukurti šią programą, pildydami „OpenStreetMap“ žemėlapį, išbandydami ir pateikdami atsiliepimus apie funkcijas bei prisidėdami savo programavimo įgūdžiais ir pinigais.
|
|
||||||
‣ <b>Atviras ir skaidrus sprendimų priėmimas ir finansai, ne pelno siekianti ir visiškai atviro kodo programa.</b>
|
|
||||||
|
|
||||||
<b>Pagrindinės funkcijos</b>:
|
|
||||||
• Atsisiunčiami išsamūs žemėlapiai su vietomis, kurių nėra „Google Maps“;
|
|
||||||
• Žygių pėsčiomis veiksena su pažymėtais pėsčiųjų takais, stovyklavietėmis, vandens šaltiniais, kalnų viršūnėmis, reljefo linijomis ir kt.;
|
|
||||||
• Pėsčiųjų ir dviračių takai;
|
|
||||||
• Potencialūs kelionės taškai, kaip antai restoranai, degalinės, viešbučiai, parduotuvės, lankytinos vietos ir daugelis kitų;
|
|
||||||
• Paieška pagal pavadinimą, adresą arba lankytinos vietos kategoriją;
|
|
||||||
• Navigacija su balso instrukcijomis pėstiesiems, dviratininkams ir motorinio transporto vairuotojams;
|
|
||||||
• Mėgstamų vietų įsiminimas vienu bakstelėjimu;
|
|
||||||
• „Vikipedijos“ straipsniai, prieinami neprisijungus prie interneto;
|
|
||||||
• Kelionių metro sluoksnis ir maršrutai;
|
|
||||||
• Trasų įrašymas;
|
|
||||||
• Žymių ir trasų eksportavimas ir importavimas KML, KMZ, GPX formatais;
|
|
||||||
• Tamsaus žemėlapio veiksena, skirta naudoti naktį;
|
|
||||||
• Galimybė papildyti žemėlapio duomenis visiems, naudojantis įtaisytuoju baziniu redaktoriumi;
|
|
||||||
• „Android Auto“ palaikymas.
|
|
||||||
|
|
||||||
Praneškite apie programos problemas, siūlykite idėjas ir prisijunkite prie mūsų bendruomenės svetainėje <b><i>comaps.app</i></b>.
|
|
||||||
|
|
||||||
<b>Laisvė yra čia</b>
|
|
||||||
Atraskite savo kelionę ir keliaukite po pasaulį, kuriame privatumas ir bendruomenė yra svarbiausia!
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Paprasta ir patogi navigacija – Turiningesnės kelionės – Vystoma bendruomenės
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CoMaps – naviguokite privačiai
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
Aplikacja mapowa tworzona przez społeczność, darmowa i open source, oparta na danych OpenStreetMap, z pełnym naciskiem na transparentność, prywatność i działanie non-profit.
|
|
||||||
|
|
||||||
Dołącz do społeczności i pomóż tworzyć najlepszą aplikację mapową
|
|
||||||
• Korzystaj z aplikacji i polecaj ją innym
|
|
||||||
• Przekazuj opinie i zgłaszaj problemy
|
|
||||||
• Aktualizuj dane mapy w aplikacji lub na stronie OpenStreetMap
|
|
||||||
|
|
||||||
<i>Twoje opinie i oceny na 5 gwiazdek są dla nas najlepszym wsparciem!</i>
|
|
||||||
|
|
||||||
‣ <b>Prosta i dopracowana</b>: najważniejsze, łatwe w użyciu funkcje, które po prostu działają.
|
|
||||||
‣ <b>Skoncentrowana na trybie offline</b>: planuj i nawiguj za granicą bez sieci komórkowej, wyszukuj punkty na odległych szlakach – wszystkie funkcje działają offline.
|
|
||||||
‣ <b>Z poszanowaniem prywatności</b>: aplikacja nie identyfikuje użytkowników, nie śledzi i nie zbiera danych osobowych. Bez reklam.
|
|
||||||
‣ <b>Oszczędza baterię i miejsce</b>: nie zużywa baterii jak inne aplikacje nawigacyjne, a kompaktowe mapy oszczędzają miejsce w telefonie.
|
|
||||||
‣ <b>Darmowa i tworzona przez społeczność</b>: ludzie tacy jak Ty dodają miejsca do OpenStreetMap, testują funkcje, zgłaszają opinie i wspierają projekt.
|
|
||||||
‣ <b>Otwarte i przejrzyste decyzje i finanse, działanie non-profit, pełne open source.</b>
|
|
||||||
|
|
||||||
<b>Główne funkcje</b>:
|
|
||||||
• Pobierane szczegółowe mapy z miejscami, których nie ma w Google Maps
|
|
||||||
• Tryb outdoor ze szlakami, biwakami, źródłami wody, szczytami, warstwicami itp.
|
|
||||||
• Ścieżki piesze i rowerowe
|
|
||||||
• Punkty zainteresowania: restauracje, stacje paliw, hotele, sklepy, atrakcje i wiele innych
|
|
||||||
• Wyszukiwanie po nazwie, adresie lub kategorii
|
|
||||||
• Nawigacja z komunikatami głosowymi dla pieszych, rowerzystów i kierowców
|
|
||||||
• Dodawanie ulubionych miejsc jednym tapnięciem
|
|
||||||
• Artykuły Wikipedii dostępne offline
|
|
||||||
• Warstwa metra i wskazówki dojazdu
|
|
||||||
• Nagrywanie śladu trasy
|
|
||||||
• Eksport i import ulubionych miejsc i tras w formatach KML, KMZ, GPX
|
|
||||||
• Tryb ciemny do używania nocą
|
|
||||||
• Poprawianie danych mapy za pomocą prostego wbudowanego edytora
|
|
||||||
• Obsługa Android Auto
|
|
||||||
|
|
||||||
Zgłaszaj problemy, proponuj pomysły i dołącz do społeczności na stronie <b><i>comaps.app</i></b>.
|
|
||||||
|
|
||||||
<b>Wolność jest tutaj</b>
|
|
||||||
Odkrywaj swoją drogę i nawiguj po świecie z prywatnością i społecznością na pierwszym miejscu!
|
|
||||||
@@ -1 +1 @@
|
|||||||
Enostavno usmerjanje – Odkrijte več o svojem potovanju – Podprto v skupnosti
|
Enostavno usmerjanje – Odkrij več o svojem potovanju – Podprto v skupnosti
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
CoMaps - Usmerjajte se zasebno
|
CoMaps - Usmerjajte zasebno
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
திறந்ததெருவரைபடம் தரவை அடிப்படையாகக் கொண்ட சமூகத்தால் வழிநடத்தப்படும் இலவச & திறந்த மூல வரைபடப் பயன்பாடு, வெளிப்படைத்தன்மை, தனியுரிமை மற்றும் இலாப நோக்கற்ற தன்மை ஆகியவற்றிற்கான அர்ப்பணிப்புடன் வலுப்படுத்தப்பட்டுள்ளது.
|
|
||||||
|
|
||||||
சமூகத்தில் சேர்ந்து சிறந்த வரைபடப் பயன்பாட்டை உருவாக்க உதவுங்கள்
|
|
||||||
• பயன்பாட்டைப் பயன்படுத்தி அதைப் பற்றிய செய்தியைப் பரப்புங்கள்
|
|
||||||
• கருத்துத் தெரிவிக்கவும் சிக்கல்களைப் புகாரளிக்கவும்
|
|
||||||
• பயன்பாட்டில் அல்லது OpenStreetMap வலைத்தளத்தில் வரைபடத் தரவைப் புதுப்பிக்கவும்
|
|
||||||
|
|
||||||
<i>உங்கள் கருத்து மற்றும் 5-நட்சத்திர மதிப்புரைகள் எங்களுக்குச் சிறந்த ஆதரவாகும்!</i>
|
|
||||||
|
|
||||||
‣ <b>எளிமையான மற்றும் மெருகூட்டப்பட்ட</b>: அத்தியாவசியமான பயன்படுத்த எளிதான அம்சங்கள் வேலை செய்கின்றன.
|
|
||||||
‣ <b>ஆஃப்லைனில் கவனம் செலுத்துகிறது</b>: செல்லுலார் சேவை தேவை இல்லாமல் உங்கள் வெளிநாட்டு பயணத்தைத் திட்டமிட்டு வழிநடத்துங்கள், தொலைதூர நடைபயணத்தின்போது வழிப்புள்ளிகளைத் தேடுங்கள் போன்றவை. அனைத்து பயன்பாட்டு செயல்பாடுகளும் ஆஃப்லைனில் வேலை செய்ய வடிவமைக்கப்பட்டுள்ளன.
|
|
||||||
‣ <b>தனியுரிமையை மதித்தல்</b>: பயன்பாடு தனியுரிமையை மனதில் கொண்டு வடிவமைக்கப்பட்டுள்ளது - மக்களை அடையாளம் காணாது, கண்காணிக்காது மற்றும் தனிப்பட்ட தகவல்களைச் சேகரிக்காது. விளம்பரங்கள் இல்லாதது.
|
|
||||||
‣ <b>உங்கள் பேட்டரி மற்றும் இடத்தைச் சேமிக்கிறது</b>: பிற வழிசெலுத்தல் பயன்பாடுகளைப் போல உங்கள் பேட்டரியை வெளியேற்றாது. சிறிய வரைபடங்கள் உங்கள் தொலைபேசியில் விலைமதிப்பற்ற இடத்தைச் சேமிக்கின்றன.
|
|
||||||
‣ <b>இலவசம் மற்றும் சமூகத்தால் உருவாக்கப்பட்டது</b>: உங்களைப் போன்றவர்கள் OpenStreetMap இல் இடங்களைச் சேர்ப்பதன் மூலமும், அம்சங்கள்குறித்து சோதித்துப் பார்த்துக் கருத்து தெரிவிப்பதன் மூலமும், அவர்களின் மேம்பாட்டுத் திறன்கள் மற்றும் பணத்தை பங்களிப்பதன் மூலமும் பயன்பாட்டை உருவாக்க உதவினார்கள்.
|
|
||||||
‣ <b>திறந்த மற்றும் வெளிப்படையான முடிவெடுக்கும் மற்றும் நிதி, இலாப நோக்கற்ற மற்றும் முழுமையாகத் திறந்த மூல.</b>
|
|
||||||
|
|
||||||
<b>முக்கிய பண்புகள்</b>:
|
|
||||||
• கூகிள் வரைபடத்தில் கிடைக்காத இடங்களுடன் பதிவிறக்கம் செய்யக்கூடிய விரிவான வரைபடங்கள்
|
|
||||||
• ஹைகிங் பாதைகள், முகாம் தளங்கள், நீர் ஆதாரங்கள், சிகரங்கள், விளிம்புக் கோடுகள் போன்றவற்றுடன் வெளிப்புற பயன்முறை
|
|
||||||
• நடைபாதைகள் மற்றும் சைக்கிள் பாதைகள்
|
|
||||||
• உணவகங்கள், எரிவாயு நிலையங்கள், ஹோட்டல்கள், கடைகள், பார்வையிடல்கள் மற்றும் பல போன்ற ஆர்வமுள்ள இடங்கள்
|
|
||||||
• பெயர் அல்லது முகவரி அல்லது ஆர்வமுள்ள இட வகைமூலம் தேடுங்கள்
|
|
||||||
• நடைபயிற்சி, சைக்கிள் ஓட்டுதல் அல்லது வாகனம் ஓட்டுவதற்கான குரல் அறிவிப்புகளுடன் வழிசெலுத்தல்
|
|
||||||
• உங்களுக்குப் பிடித்த இடங்களை ஒரே தட்டலில் புக்மார்க் செய்யவும்
|
|
||||||
• ஆஃப்லைன் விக்கிபீடியா கட்டுரைகள்
|
|
||||||
• சுரங்கப்பாதை போக்குவரத்து அடுக்கு மற்றும் திசைகள்
|
|
||||||
• பதிவுசெய்தலைக் கண்காணிக்கவும்
|
|
||||||
• KML, KMZ, GPX வடிவங்களில் புக்மார்க்குகள் மற்றும் தடங்களை ஏற்றுமதி செய்து இறக்குமதி செய்யவும்
|
|
||||||
• இரவில் பயன்படுத்த ஒரு இருண்ட பயன்முறை
|
|
||||||
• அடிப்படை உள்ளமைக்கப்பட்ட எடிட்டரைப் பயன்படுத்தி அனைவருக்கும் வரைபடத் தரவை மேம்படுத்தவும்
|
|
||||||
• ஆண்டாய்டு தானி ஆதரவு
|
|
||||||
|
|
||||||
பயன்பாட்டு சிக்கல்களைப் புகாரளிக்கவும், யோசனைகளைப் பரிந்துரைக்கவும் மற்றும் எங்கள் சமூகத்தில் சேரவும் <b><i>comaps.app</i></b> வலைத்தளம்.
|
|
||||||
|
|
||||||
<b>சுதந்திரம் இங்கே உள்ளது</b>
|
|
||||||
உங்கள் பயணத்தைக் கண்டறியவும், தனியுரிமை மற்றும் சமூகத்தை முன்னணியில் வைத்து உலகை வழிநடத்தவும்!
|
|
||||||
@@ -1 +1 @@
|
|||||||
எளிய வழிகாட்டி - பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
எளிதான வரைபட வழிசெல் - உங்கள் பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
இணைவரைபடங்கள் - தனியுரிமை
|
|
||||||
@@ -18,7 +18,6 @@ import android.location.Location;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
@@ -26,15 +25,7 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
|
||||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||||
import app.organicmaps.dialog.CustomMapServerDialog;
|
|
||||||
import app.organicmaps.downloader.MapManagerHelper;
|
import app.organicmaps.downloader.MapManagerHelper;
|
||||||
import app.organicmaps.intent.Factory;
|
import app.organicmaps.intent.Factory;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
@@ -47,7 +38,11 @@ import app.organicmaps.sdk.util.StringUtils;
|
|||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import com.google.android.material.progressindicator.LinearProgressIndicator;
|
||||||
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -59,7 +54,6 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
private MaterialTextView mTvMessage;
|
private MaterialTextView mTvMessage;
|
||||||
private LinearProgressIndicator mProgress;
|
private LinearProgressIndicator mProgress;
|
||||||
private MaterialButton mBtnDownload;
|
private MaterialButton mBtnDownload;
|
||||||
private MaterialButton mBtnAdvanced;
|
|
||||||
private MaterialCheckBox mChbDownloadCountry;
|
private MaterialCheckBox mChbDownloadCountry;
|
||||||
|
|
||||||
private String mCurrentCountry;
|
private String mCurrentCountry;
|
||||||
@@ -273,14 +267,6 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
mProgress = findViewById(R.id.progressbar);
|
mProgress = findViewById(R.id.progressbar);
|
||||||
mBtnDownload = findViewById(R.id.btn_download_resources);
|
mBtnDownload = findViewById(R.id.btn_download_resources);
|
||||||
mChbDownloadCountry = findViewById(R.id.chb_download_country);
|
mChbDownloadCountry = findViewById(R.id.chb_download_country);
|
||||||
mBtnAdvanced = findViewById(R.id.btn_advanced);
|
|
||||||
|
|
||||||
mBtnAdvanced.setOnClickListener(v -> {
|
|
||||||
CustomMapServerDialog.show(this, url -> {
|
|
||||||
prepareFilesDownload(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
mBtnAdvanced.setEnabled(true);
|
|
||||||
|
|
||||||
mBtnListeners = new View.OnClickListener[BTN_COUNT];
|
mBtnListeners = new View.OnClickListener[BTN_COUNT];
|
||||||
mBtnNames = new String[BTN_COUNT];
|
mBtnNames = new String[BTN_COUNT];
|
||||||
@@ -305,11 +291,6 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
mBtnDownload.setOnClickListener(mBtnListeners[action]);
|
mBtnDownload.setOnClickListener(mBtnListeners[action]);
|
||||||
mBtnDownload.setText(mBtnNames[action]);
|
mBtnDownload.setText(mBtnNames[action]);
|
||||||
|
|
||||||
// Allow changing server only when idle or after an error.
|
|
||||||
boolean advancedEnabled = (action == DOWNLOAD || action == TRY_AGAIN || action == RESUME);
|
|
||||||
mBtnAdvanced.setEnabled(advancedEnabled);
|
|
||||||
mBtnAdvanced.setAlpha(advancedEnabled ? 1f : 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doDownload()
|
private void doDownload()
|
||||||
@@ -378,9 +359,6 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private void finishFilesDownload(int result)
|
private void finishFilesDownload(int result)
|
||||||
{
|
{
|
||||||
mBtnAdvanced.setEnabled(true);
|
|
||||||
mBtnAdvanced.setAlpha(1f);
|
|
||||||
|
|
||||||
if (result == ERR_NO_MORE_FILES)
|
if (result == ERR_NO_MORE_FILES)
|
||||||
{
|
{
|
||||||
// World and WorldCoasts has been downloaded, we should register maps again to correctly add them to the model.
|
// World and WorldCoasts has been downloaded, we should register maps again to correctly add them to the model.
|
||||||
@@ -446,20 +424,16 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||||
};
|
};
|
||||||
|
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setOnCancelListener((dialog) -> setAction(RESUME))
|
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||||
.setPositiveButton(R.string.try_again,
|
.setPositiveButton(R.string.try_again,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
setAction(TRY_AGAIN);
|
setAction(TRY_AGAIN);
|
||||||
onTryAgainClicked();
|
onTryAgainClicked();
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.cancel,
|
|
||||||
(dialog, which) -> {
|
|
||||||
setAction(RESUME);
|
|
||||||
})
|
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentFactory;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
@@ -107,7 +108,6 @@ import app.organicmaps.sdk.routing.RoutingOptions;
|
|||||||
import app.organicmaps.sdk.search.SearchEngine;
|
import app.organicmaps.sdk.search.SearchEngine;
|
||||||
import app.organicmaps.sdk.settings.RoadType;
|
import app.organicmaps.sdk.settings.RoadType;
|
||||||
import app.organicmaps.sdk.settings.UnitLocale;
|
import app.organicmaps.sdk.settings.UnitLocale;
|
||||||
import app.organicmaps.sdk.sound.TtsPlayer;
|
|
||||||
import app.organicmaps.sdk.util.Config;
|
import app.organicmaps.sdk.util.Config;
|
||||||
import app.organicmaps.sdk.util.LocationUtils;
|
import app.organicmaps.sdk.util.LocationUtils;
|
||||||
import app.organicmaps.sdk.util.PowerManagment;
|
import app.organicmaps.sdk.util.PowerManagment;
|
||||||
@@ -133,6 +133,7 @@ import com.google.android.material.appbar.MaterialToolbar;
|
|||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -432,7 +433,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
dismissLocationErrorDialog();
|
dismissLocationErrorDialog();
|
||||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this)
|
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.unknown_current_position)
|
.setMessage(R.string.unknown_current_position)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -655,7 +656,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.message_invalid_feature_position)
|
.setTitle(R.string.message_invalid_feature_position)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
@@ -1155,7 +1156,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
if (type == IsolinesState.EXPIREDDATA)
|
if (type == IsolinesState.EXPIREDDATA)
|
||||||
{
|
{
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_update_maps)
|
.setTitle(R.string.downloader_update_maps)
|
||||||
.setMessage(R.string.isolines_activation_error_dialog)
|
.setMessage(R.string.isolines_activation_error_dialog)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
@@ -1774,7 +1775,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.unable_to_calc_alert_title)
|
.setTitle(R.string.unable_to_calc_alert_title)
|
||||||
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
||||||
.setPositiveButton(R.string.settings,
|
.setPositiveButton(R.string.settings,
|
||||||
@@ -1797,7 +1798,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
builder.append(getString(resId)).append("\n\n");
|
builder.append(getString(resId)).append("\n\n");
|
||||||
|
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.dialog_routing_disclaimer_title)
|
.setTitle(R.string.dialog_routing_disclaimer_title)
|
||||||
.setMessage(builder.toString())
|
.setMessage(builder.toString())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
@@ -1813,26 +1814,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deliverTtsMessage()
|
|
||||||
{
|
|
||||||
if (Config.isTtsMessageDelivered())
|
|
||||||
return;
|
|
||||||
|
|
||||||
String languageDisplayName = TtsPlayer.INSTANCE.getLanguageDisplayName();
|
|
||||||
|
|
||||||
if (languageDisplayName != null)
|
|
||||||
{
|
|
||||||
String navigationStartMessage = getResources().getString(R.string.navigation_start_tts_message);
|
|
||||||
navigationStartMessage += languageDisplayName;
|
|
||||||
Toast.makeText(this, navigationStartMessage, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Toast.makeText(this, getResources().getString(R.string.navigation_start_tts_disabled_message), Toast.LENGTH_LONG)
|
|
||||||
.show();
|
|
||||||
|
|
||||||
Config.setTtsMessageDelivered();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean showStartPointNotice()
|
private boolean showStartPointNotice()
|
||||||
{
|
{
|
||||||
final RoutingController controller = RoutingController.get();
|
final RoutingController controller = RoutingController.get();
|
||||||
@@ -1846,7 +1827,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
final MapObject endPoint = Objects.requireNonNull(controller.getEndPoint());
|
final MapObject endPoint = Objects.requireNonNull(controller.getEndPoint());
|
||||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this)
|
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.p2p_only_from_current)
|
.setTitle(R.string.p2p_only_from_current)
|
||||||
.setMessage(R.string.p2p_reroute_from_current)
|
.setMessage(R.string.p2p_reroute_from_current)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
@@ -2040,7 +2021,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
mPreciseLocationDialogShown = true;
|
mPreciseLocationDialogShown = true;
|
||||||
final MaterialAlertDialogBuilder builder =
|
final MaterialAlertDialogBuilder builder =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
||||||
.setMessage(R.string.precise_location_is_disabled_long_text)
|
.setMessage(R.string.precise_location_is_disabled_long_text)
|
||||||
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
||||||
@@ -2074,7 +2055,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(this)
|
mLocationErrorDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.enable_location_services)
|
.setTitle(R.string.enable_location_services)
|
||||||
.setMessage(R.string.location_is_disabled_long_text)
|
.setMessage(R.string.location_is_disabled_long_text)
|
||||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||||
@@ -2167,7 +2148,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this)
|
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.enable_location_services)
|
.setTitle(R.string.enable_location_services)
|
||||||
.setMessage(R.string.location_is_disabled_long_text)
|
.setMessage(R.string.location_is_disabled_long_text)
|
||||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||||
@@ -2209,8 +2190,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
if (!showRoutingDisclaimer())
|
if (!showRoutingDisclaimer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
deliverTtsMessage();
|
|
||||||
|
|
||||||
closeFloatingPanels();
|
closeFloatingPanels();
|
||||||
setFullscreen(false);
|
setFullscreen(false);
|
||||||
RoutingController.get().start();
|
RoutingController.get().start();
|
||||||
@@ -2253,7 +2232,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
final MaterialAlertDialogBuilder builder =
|
final MaterialAlertDialogBuilder builder =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.current_location_unknown_error_title)
|
.setTitle(R.string.current_location_unknown_error_title)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setMessage(R.string.power_save_dialog_summary)
|
.setMessage(R.string.power_save_dialog_summary)
|
||||||
@@ -2278,7 +2257,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(getString(R.string.unknown_file_type, uri))
|
.setMessage(getString(R.string.unknown_file_type, uri))
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2295,7 +2274,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(getString(R.string.failed_to_open_file, uri, error))
|
.setMessage(getString(R.string.failed_to_open_file, uri, error))
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2317,7 +2296,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
public void onBookmarksFileImportFailed()
|
public void onBookmarksFileImportFailed()
|
||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(R.string.load_kmz_failed)
|
.setMessage(R.string.load_kmz_failed)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2578,7 +2557,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private void reportUnsupported()
|
private void reportUnsupported()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.unsupported_phone)
|
.setMessage(R.string.unsupported_phone)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton(R.string.close, (dlg, which) -> this.moveTaskToBack(true))
|
.setPositiveButton(R.string.close, (dlg, which) -> this.moveTaskToBack(true))
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ public class SplashActivity extends AppCompatActivity
|
|||||||
private void showFatalErrorDialog(@StringRes int titleId, @StringRes int messageId, Exception error)
|
private void showFatalErrorDialog(@StringRes int titleId, @StringRes int messageId, Exception error)
|
||||||
{
|
{
|
||||||
mCanceled = true;
|
mCanceled = true;
|
||||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_M3_AlertDialog)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ import androidx.fragment.app.FragmentManager;
|
|||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.SplashActivity;
|
import app.organicmaps.SplashActivity;
|
||||||
|
import app.organicmaps.sdk.util.Config;
|
||||||
import app.organicmaps.sdk.util.log.Logger;
|
import app.organicmaps.sdk.util.log.Logger;
|
||||||
|
import app.organicmaps.util.RtlUtils;
|
||||||
import com.google.android.material.appbar.MaterialToolbar;
|
import com.google.android.material.appbar.MaterialToolbar;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ public abstract class BaseMwmFragmentActivity extends AppCompatActivity
|
|||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
EdgeToEdge.enable(this, SystemBarStyle.dark(Color.TRANSPARENT));
|
EdgeToEdge.enable(this, SystemBarStyle.dark(Color.TRANSPARENT));
|
||||||
|
RtlUtils.manageRtl(this);
|
||||||
if (!MwmApplication.from(this).getOrganicMaps().arePlatformAndCoreInitialized())
|
if (!MwmApplication.from(this).getOrganicMaps().arePlatformAndCoreInitialized())
|
||||||
{
|
{
|
||||||
final Intent intent = Objects.requireNonNull(getIntent());
|
final Intent intent = Objects.requireNonNull(getIntent());
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
@NonNull
|
@NonNull
|
||||||
private TextInputEditText mEditDescView;
|
private TextInputEditText mEditDescView;
|
||||||
|
|
||||||
@SuppressWarnings("NullableProblems")
|
|
||||||
@NonNull
|
|
||||||
private TextInputLayout mEditCategoryNameLayout;
|
|
||||||
|
|
||||||
@SuppressWarnings("NullableProblems")
|
@SuppressWarnings("NullableProblems")
|
||||||
@NonNull
|
@NonNull
|
||||||
private TextInputEditText mEditCategoryNameView;
|
private TextInputEditText mEditCategoryNameView;
|
||||||
@@ -65,8 +61,8 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
private void initViews(@NonNull View root)
|
private void initViews(@NonNull View root)
|
||||||
{
|
{
|
||||||
mEditCategoryNameView = root.findViewById(R.id.edit_list_name_view);
|
mEditCategoryNameView = root.findViewById(R.id.edit_list_name_view);
|
||||||
mEditCategoryNameLayout = root.findViewById(R.id.edit_list_name_input);
|
TextInputLayout clearNameBtn = root.findViewById(R.id.edit_list_name_input);
|
||||||
mEditCategoryNameLayout.setEndIconOnClickListener(v -> clearAndFocus(mEditCategoryNameView));
|
clearNameBtn.setEndIconOnClickListener(v -> clearAndFocus(mEditCategoryNameView));
|
||||||
mEditCategoryNameView.setText(mCategory.getName());
|
mEditCategoryNameView.setText(mCategory.getName());
|
||||||
InputFilter[] f = {new InputFilter.LengthFilter(TEXT_LENGTH_LIMIT)};
|
InputFilter[] f = {new InputFilter.LengthFilter(TEXT_LENGTH_LIMIT)};
|
||||||
mEditCategoryNameView.setFilters(f);
|
mEditCategoryNameView.setFilters(f);
|
||||||
@@ -79,26 +75,7 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2)
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2)
|
||||||
{
|
{
|
||||||
if (charSequence.length() > 0)
|
clearNameBtn.setEndIconVisible(charSequence.length() > 0);
|
||||||
{
|
|
||||||
mEditCategoryNameLayout.setEndIconVisible(true);
|
|
||||||
mEditCategoryNameLayout.setErrorEnabled(false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mEditCategoryNameLayout.setEndIconVisible(false);
|
|
||||||
mEditCategoryNameLayout.setErrorEnabled(true);
|
|
||||||
mEditCategoryNameLayout.setError(getString(R.string.bookmarks_error_title_empty_list_name));
|
|
||||||
}
|
|
||||||
if (BookmarkManager.INSTANCE.isUsedCategoryName(charSequence.toString()) && !TextUtils.equals(charSequence.toString(), mCategory.getName()))
|
|
||||||
{
|
|
||||||
mEditCategoryNameLayout.setErrorEnabled(true);
|
|
||||||
mEditCategoryNameLayout.setError(getString(R.string.bookmarks_error_title_list_name_already_taken));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mEditCategoryNameLayout.setErrorEnabled(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -60,14 +60,14 @@ public enum BookmarksSharingHelper
|
|||||||
case BookmarkSharingResult.SUCCESS ->
|
case BookmarkSharingResult.SUCCESS ->
|
||||||
SharingUtils.shareBookmarkFile(context, launcher, result.getSharingPath(), result.getMimeType());
|
SharingUtils.shareBookmarkFile(context, launcher, result.getSharingPath(), result.getMimeType());
|
||||||
case BookmarkSharingResult.EMPTY_CATEGORY ->
|
case BookmarkSharingResult.EMPTY_CATEGORY ->
|
||||||
new MaterialAlertDialogBuilder(context)
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.bookmarks_error_title_share_empty)
|
.setTitle(R.string.bookmarks_error_title_share_empty)
|
||||||
.setMessage(R.string.bookmarks_error_message_share_empty)
|
.setMessage(R.string.bookmarks_error_message_share_empty)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
case BookmarkSharingResult.ARCHIVE_ERROR, BookmarkSharingResult.FILE_ERROR ->
|
case BookmarkSharingResult.ARCHIVE_ERROR, BookmarkSharingResult.FILE_ERROR ->
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(context)
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.dialog_routing_system_error)
|
.setTitle(R.string.dialog_routing_system_error)
|
||||||
.setMessage(R.string.bookmarks_error_message_share_general)
|
.setMessage(R.string.bookmarks_error_message_share_general)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ public final class UiHelpers
|
|||||||
{
|
{
|
||||||
case LocationState.PENDING_POSITION, LocationState.NOT_FOLLOW_NO_POSITION ->
|
case LocationState.PENDING_POSITION, LocationState.NOT_FOLLOW_NO_POSITION ->
|
||||||
drawableRes = R.drawable.ic_location_off;
|
drawableRes = R.drawable.ic_location_off;
|
||||||
case LocationState.NOT_FOLLOW -> drawableRes = R.drawable.ic_location_crosshair;
|
case LocationState.NOT_FOLLOW -> drawableRes = R.drawable.ic_not_follow;
|
||||||
case LocationState.FOLLOW ->
|
case LocationState.FOLLOW ->
|
||||||
{
|
{
|
||||||
drawableRes = R.drawable.ic_follow;
|
drawableRes = R.drawable.ic_follow;
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
package app.organicmaps.dialog;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.preference.PreferenceManager;
|
|
||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
|
||||||
|
|
||||||
import app.organicmaps.R;
|
|
||||||
import app.organicmaps.sdk.Framework;
|
|
||||||
|
|
||||||
public final class CustomMapServerDialog
|
|
||||||
{
|
|
||||||
public interface OnUrlAppliedListener
|
|
||||||
{
|
|
||||||
void onUrlApplied(@NonNull String url);
|
|
||||||
}
|
|
||||||
|
|
||||||
private CustomMapServerDialog() {}
|
|
||||||
|
|
||||||
public static void show(@NonNull Context context,
|
|
||||||
@Nullable OnUrlAppliedListener listener)
|
|
||||||
{
|
|
||||||
View dialogView = LayoutInflater.from(context)
|
|
||||||
.inflate(R.layout.dialog_custom_map_server, null);
|
|
||||||
TextInputLayout til = dialogView.findViewById(R.id.til_custom_map_server);
|
|
||||||
TextInputEditText edit = dialogView.findViewById(R.id.edit_custom_map_server);
|
|
||||||
|
|
||||||
SharedPreferences prefs =
|
|
||||||
PreferenceManager.getDefaultSharedPreferences(context);
|
|
||||||
String current = prefs.getString(context.getString(R.string.pref_custom_map_download_url), "");
|
|
||||||
edit.setText(current);
|
|
||||||
|
|
||||||
MaterialAlertDialogBuilder builder =
|
|
||||||
new MaterialAlertDialogBuilder(context)
|
|
||||||
.setTitle(R.string.download_resources_custom_url_title)
|
|
||||||
.setMessage(R.string.download_resources_custom_url_message)
|
|
||||||
.setView(dialogView)
|
|
||||||
.setNegativeButton(R.string.cancel, null)
|
|
||||||
.setPositiveButton(R.string.save, null);
|
|
||||||
|
|
||||||
AlertDialog dialog = builder.create();
|
|
||||||
dialog.setOnShowListener(dlg -> {
|
|
||||||
Button ok = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
|
|
||||||
ok.setOnClickListener(v -> {
|
|
||||||
String url = edit.getText() != null ? edit.getText().toString().trim() : "";
|
|
||||||
|
|
||||||
if (!url.isEmpty()
|
|
||||||
&& !url.startsWith("http://")
|
|
||||||
&& !url.startsWith("https://"))
|
|
||||||
{
|
|
||||||
til.setError(context.getString(R.string.download_resources_custom_url_error_scheme));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
til.setError(null);
|
|
||||||
|
|
||||||
String normalizedUrl = Framework.normalizeServerUrl(url);
|
|
||||||
|
|
||||||
prefs.edit()
|
|
||||||
.putString(context.getString(R.string.pref_custom_map_download_url), normalizedUrl)
|
|
||||||
.apply();
|
|
||||||
|
|
||||||
// Apply to native
|
|
||||||
Framework.applyCustomMapDownloadUrl(context, normalizedUrl);
|
|
||||||
|
|
||||||
if (listener != null)
|
|
||||||
listener.onUrlApplied(normalizedUrl);
|
|
||||||
|
|
||||||
dialog.dismiss();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
dialog.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -113,7 +113,7 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
|||||||
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON);
|
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON);
|
||||||
}
|
}
|
||||||
|
|
||||||
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity())
|
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setView(buildView())
|
.setView(buildView())
|
||||||
.setNegativeButton(negativeButtonText, null)
|
.setNegativeButton(negativeButtonText, null)
|
||||||
.setPositiveButton(positiveButtonText, null)
|
.setPositiveButton(positiveButtonText, null)
|
||||||
@@ -152,7 +152,7 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
|||||||
if (mInputValidator != null)
|
if (mInputValidator != null)
|
||||||
{
|
{
|
||||||
final String maybeError = mInputValidator.validate(activity, input);
|
final String maybeError = mInputValidator.validate(activity, input);
|
||||||
mEtInputLayout.setError(maybeError);
|
mEtInputLayout.getEditText().setError(maybeError);
|
||||||
mEtInputLayout.requestFocus();
|
mEtInputLayout.requestFocus();
|
||||||
return maybeError == null;
|
return maybeError == null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||||||
{
|
{
|
||||||
if (RoutingController.get().isNavigating())
|
if (RoutingController.get().isNavigating())
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_delete_map)
|
.setTitle(R.string.downloader_delete_map)
|
||||||
.setMessage(R.string.downloader_delete_map_while_routing_dialog)
|
.setMessage(R.string.downloader_delete_map_while_routing_dialog)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -133,7 +133,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_delete_map)
|
.setTitle(R.string.downloader_delete_map)
|
||||||
.setMessage(R.string.downloader_delete_map_dialog)
|
.setMessage(R.string.downloader_delete_map_dialog)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class MapManagerHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity)
|
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.country_status_download_failed)
|
.setTitle(R.string.country_status_download_failed)
|
||||||
.setMessage(getErrorCodeStrRes(errorData.errorCode))
|
.setMessage(getErrorCodeStrRes(errorData.errorCode))
|
||||||
.setNegativeButton(R.string.cancel,
|
.setNegativeButton(R.string.cancel,
|
||||||
@@ -72,7 +72,7 @@ public class MapManagerHelper
|
|||||||
|
|
||||||
private static void notifyNoSpaceInternal(Activity activity)
|
private static void notifyNoSpaceInternal(Activity activity)
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(activity)
|
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_no_space_title)
|
.setTitle(R.string.downloader_no_space_title)
|
||||||
.setMessage(R.string.downloader_no_space_message)
|
.setMessage(R.string.downloader_no_space_message)
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
.setPositiveButton(android.R.string.ok, null)
|
||||||
@@ -123,7 +123,7 @@ public class MapManagerHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(activity)
|
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.download_over_mobile_header)
|
.setTitle(R.string.download_over_mobile_header)
|
||||||
.setMessage(R.string.download_over_mobile_message)
|
.setMessage(R.string.download_over_mobile_message)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package app.organicmaps.editor;
|
package app.organicmaps.editor;
|
||||||
|
|
||||||
import static android.view.View.INVISIBLE;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -15,13 +13,14 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
import android.widget.GridLayout;
|
import android.widget.GridLayout;
|
||||||
|
import android.widget.Toast;
|
||||||
import androidx.annotation.CallSuper;
|
import androidx.annotation.CallSuper;
|
||||||
import androidx.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
@@ -43,9 +42,9 @@ import app.organicmaps.util.Graphics;
|
|||||||
import app.organicmaps.util.InputUtils;
|
import app.organicmaps.util.InputUtils;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
import com.google.android.material.card.MaterialCardView;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
@@ -116,9 +115,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
private MaterialTextView mPhone;
|
private MaterialTextView mPhone;
|
||||||
private MaterialButton mEditPhoneLink;
|
private MaterialButton mEditPhoneLink;
|
||||||
private MaterialTextView mCuisine;
|
private MaterialTextView mCuisine;
|
||||||
private MaterialSwitch mWifi;
|
private SwitchCompat mWifi;
|
||||||
private MaterialTextView mSelfService;
|
private MaterialTextView mSelfService;
|
||||||
private MaterialSwitch mOutdoorSeating;
|
private SwitchCompat mOutdoorSeating;
|
||||||
|
|
||||||
// Default Metadata entries.
|
// Default Metadata entries.
|
||||||
private static final class MetadataEntry
|
private static final class MetadataEntry
|
||||||
@@ -196,7 +195,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
{
|
{
|
||||||
final Context context = mInputBuildingLevels.getContext();
|
final Context context = mInputBuildingLevels.getContext();
|
||||||
final boolean isValid = Editor.nativeIsLevelValid(s.toString());
|
final boolean isValid = Editor.nativeIsLevelValid(s.toString());
|
||||||
mInputBuildingLevels.setError(isValid ? null : context.getString(R.string.error_enter_correct_storey_number,
|
UiUtils.setInputError(mInputBuildingLevels,
|
||||||
|
isValid ? null
|
||||||
|
: context.getString(R.string.error_enter_correct_storey_number,
|
||||||
Editor.nativeGetMaxEditableBuildingLevels()));
|
Editor.nativeGetMaxEditableBuildingLevels()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -352,7 +353,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
{
|
{
|
||||||
hasChargeSockets = hasChargeSockets || (type == Metadata.MetadataType.FMD_CHARGE_SOCKETS.toInt());
|
hasChargeSockets = hasChargeSockets || (type == Metadata.MetadataType.FMD_CHARGE_SOCKETS.toInt());
|
||||||
}
|
}
|
||||||
UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
// Hide socket until https://codeberg.org/comaps/comaps/issues/2368 is fixed
|
||||||
|
//UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
||||||
|
|
||||||
setCardVisibility(mCardDetails, mDetailsBlocks, editableDetails);
|
setCardVisibility(mCardDetails, mDetailsBlocks, editableDetails);
|
||||||
setCardVisibility(mCardSocialMedia, mSocialMediaBlocks, editableDetails);
|
setCardVisibility(mCardSocialMedia, mSocialMediaBlocks, editableDetails);
|
||||||
@@ -394,18 +396,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
typeBtns.removeAllViews();
|
typeBtns.removeAllViews();
|
||||||
|
|
||||||
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
|
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
|
||||||
for (String socketType : SOCKET_TYPES)
|
for (String socket : SOCKET_TYPES)
|
||||||
{
|
{
|
||||||
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType,0,0);
|
|
||||||
|
|
||||||
MaterialButton btn = (MaterialButton) inflater.inflate(R.layout.button_socket_type, typeBtns, false);
|
MaterialButton btn = (MaterialButton) inflater.inflate(R.layout.button_socket_type, typeBtns, false);
|
||||||
|
|
||||||
btn.setTag(R.id.socket_type, socket.type());
|
btn.setTag(R.id.socket_type, socket);
|
||||||
|
|
||||||
// load SVG icon converted into VectorDrawable in res/drawable
|
// load SVG icon converted into VectorDrawable in res/drawable
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resIconId =
|
int resIconId =
|
||||||
getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable", requireContext().getPackageName());
|
getResources().getIdentifier("ic_charge_socket_" + socket, "drawable", requireContext().getPackageName());
|
||||||
if (resIconId != 0)
|
if (resIconId != 0)
|
||||||
{
|
{
|
||||||
btn.setIcon(getResources().getDrawable(resIconId));
|
btn.setIcon(getResources().getDrawable(resIconId));
|
||||||
@@ -413,7 +413,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resTypeId =
|
int resTypeId =
|
||||||
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
|
getResources().getIdentifier("charge_socket_" + socket, "string", requireContext().getPackageName());
|
||||||
if (resTypeId != 0)
|
if (resTypeId != 0)
|
||||||
{
|
{
|
||||||
btn.setText(getResources().getString(resTypeId));
|
btn.setText(getResources().getString(resTypeId));
|
||||||
@@ -493,7 +493,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return new MaterialAlertDialogBuilder(requireActivity())
|
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_socket)
|
.setTitle(R.string.editor_socket)
|
||||||
.setView(dialogView)
|
.setView(dialogView)
|
||||||
.setPositiveButton(R.string.save,
|
.setPositiveButton(R.string.save,
|
||||||
@@ -545,7 +545,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
updateChargeSockets(socketIndex, socket);
|
updateChargeSockets(socketIndex, socket);
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
.setNegativeButton(R.string.cancel, (dialog, which) -> { dialog.dismiss(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method for validation logic
|
// Helper method for validation logic
|
||||||
@@ -601,7 +601,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
GridLayout socketsGrid = mChargeSockets.findViewById(R.id.socket_grid_editor);
|
GridLayout socketsGrid = mChargeSockets.findViewById(R.id.socket_grid_editor);
|
||||||
socketsGrid.removeAllViews();
|
socketsGrid.removeAllViews();
|
||||||
|
|
||||||
for (int i = 0; i < sockets.length; i++) {
|
for (int i = 0; i < sockets.length; i++)
|
||||||
|
{
|
||||||
final int currentIndex = i;
|
final int currentIndex = i;
|
||||||
ChargeSocketDescriptor socket = sockets[i];
|
ChargeSocketDescriptor socket = sockets[i];
|
||||||
|
|
||||||
@@ -612,42 +613,45 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
MaterialTextView power = itemView.findViewById(R.id.socket_power);
|
MaterialTextView power = itemView.findViewById(R.id.socket_power);
|
||||||
MaterialTextView count = itemView.findViewById(R.id.socket_count);
|
MaterialTextView count = itemView.findViewById(R.id.socket_count);
|
||||||
|
|
||||||
|
|
||||||
// load SVG icon converted into VectorDrawable in res/drawable
|
// load SVG icon converted into VectorDrawable in res/drawable
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.type(), "drawable",
|
||||||
requireContext().getPackageName());
|
requireContext().getPackageName());
|
||||||
if (resIconId != 0) {
|
if (resIconId != 0)
|
||||||
|
{
|
||||||
icon.setImageResource(resIconId);
|
icon.setImageResource(resIconId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("DiscouragedApi")
|
@SuppressLint("DiscouragedApi")
|
||||||
int resTypeId =
|
int resTypeId =
|
||||||
getResources().getIdentifier("charge_socket_" + socket.visualType(), "string", requireContext().getPackageName());
|
getResources().getIdentifier("charge_socket_" + socket.type(), "string", requireContext().getPackageName());
|
||||||
if (resTypeId != 0) {
|
if (resTypeId != 0)
|
||||||
|
{
|
||||||
type.setText(resTypeId);
|
type.setText(resTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socket.power() != 0) {
|
if (socket.power() != 0)
|
||||||
|
{
|
||||||
DecimalFormat df = new DecimalFormat("#.##");
|
DecimalFormat df = new DecimalFormat("#.##");
|
||||||
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
||||||
}
|
}
|
||||||
else if (socket.ignorePower()) {
|
|
||||||
power.setVisibility(INVISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (socket.count() != 0)
|
if (socket.count() != 0)
|
||||||
{
|
{
|
||||||
count.setText(getString(R.string.count_label, socket.count()));
|
count.setText(getString(R.string.count_label, socket.count()));
|
||||||
}
|
}
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
|
itemView.setOnClickListener(v -> {
|
||||||
|
buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show();
|
||||||
|
});
|
||||||
socketsGrid.addView(itemView);
|
socketsGrid.addView(itemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a 'new item' button at the end, to create new sockets
|
// add a 'new item' button at the end, to create new sockets
|
||||||
View btnNewItemView = inflater.inflate(R.layout.button_new_item, socketsGrid, false);
|
View btnNewItemView = inflater.inflate(R.layout.button_new_item, socketsGrid, false);
|
||||||
btnNewItemView.setOnClickListener(v -> buildChargeSocketDialog(-1, "unknown", -1, -1).show());
|
btnNewItemView.setOnClickListener(v -> {
|
||||||
|
buildChargeSocketDialog(-1, "unknown", -1, -1).show();
|
||||||
|
});
|
||||||
socketsGrid.addView(btnNewItemView);
|
socketsGrid.addView(btnNewItemView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -946,7 +950,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE);
|
mDisused.setVisibility(Editor.nativeCanMarkPlaceAsDisused() ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
if (Editor.nativeAreSomeFeatureChangesUploaded())
|
if (Editor.nativeIsMapObjectUploaded())
|
||||||
{
|
{
|
||||||
mReset.setText(R.string.editor_place_doesnt_exist);
|
mReset.setText(R.string.editor_place_doesnt_exist);
|
||||||
return;
|
return;
|
||||||
@@ -964,7 +968,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void reset()
|
private void reset()
|
||||||
{
|
{
|
||||||
if (Editor.nativeAreSomeFeatureChangesUploaded())
|
if (Editor.nativeIsMapObjectUploaded())
|
||||||
{
|
{
|
||||||
placeDoesntExist();
|
placeDoesntExist();
|
||||||
return;
|
return;
|
||||||
@@ -997,7 +1001,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
message = R.string.editor_reset_edits_message;
|
message = R.string.editor_reset_edits_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(message)
|
.setTitle(message)
|
||||||
.setPositiveButton(title,
|
.setPositiveButton(title,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
@@ -1020,7 +1024,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void placeDisused()
|
private void placeDisused()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||||
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ public class EditorHostFragment
|
|||||||
|
|
||||||
private void processNoFeatures()
|
private void processNoFeatures()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_no_space_title)
|
.setTitle(R.string.downloader_no_space_title)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
@@ -386,7 +386,7 @@ public class EditorHostFragment
|
|||||||
|
|
||||||
private void showNoobDialog()
|
private void showNoobDialog()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_share_to_all_dialog_title)
|
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
package app.organicmaps.editor;
|
package app.organicmaps.editor;
|
||||||
|
|
||||||
import android.content.res.ColorStateList;
|
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.sdk.editor.data.FeatureCategory;
|
import app.organicmaps.sdk.editor.data.FeatureCategory;
|
||||||
import app.organicmaps.sdk.util.StringUtils;
|
import app.organicmaps.sdk.util.StringUtils;
|
||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
|
|
||||||
import com.google.android.material.button.MaterialButton;
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
|
|
||||||
@@ -123,7 +119,7 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
|||||||
protected static class FooterViewHolder extends RecyclerView.ViewHolder
|
protected static class FooterViewHolder extends RecyclerView.ViewHolder
|
||||||
{
|
{
|
||||||
private final TextInputEditText mNoteEditText;
|
private final TextInputEditText mNoteEditText;
|
||||||
private final MaterialButton mSendNoteButton;
|
private final View mSendNoteButton;
|
||||||
|
|
||||||
FooterViewHolder(@NonNull View itemView, @NonNull FooterListener listener)
|
FooterViewHolder(@NonNull View itemView, @NonNull FooterListener listener)
|
||||||
{
|
{
|
||||||
@@ -133,29 +129,6 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
|||||||
mNoteEditText = itemView.findViewById(R.id.note_edit_text);
|
mNoteEditText = itemView.findViewById(R.id.note_edit_text);
|
||||||
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
|
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
|
||||||
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
|
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
|
||||||
final ColorStateList bgButtonColor = new ColorStateList(
|
|
||||||
new int[][]{
|
|
||||||
new int[]{android.R.attr.state_enabled}, // enabled
|
|
||||||
new int[]{-android.R.attr.state_enabled} // disabled
|
|
||||||
},
|
|
||||||
new int[]{
|
|
||||||
ContextCompat.getColor(
|
|
||||||
mSendNoteButton.getContext(), R.color.base_accent),
|
|
||||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)
|
|
||||||
});
|
|
||||||
final ColorStateList textButtonColor = new ColorStateList(
|
|
||||||
new int[][]{
|
|
||||||
new int[]{android.R.attr.state_enabled}, // enabled
|
|
||||||
new int[]{-android.R.attr.state_enabled} // disabled
|
|
||||||
},
|
|
||||||
new int[]{
|
|
||||||
ContextCompat.getColor(
|
|
||||||
mSendNoteButton.getContext(),
|
|
||||||
UiUtils.getStyledResourceId(mSendNoteButton.getContext(), android.R.attr.textColorPrimaryInverse)),
|
|
||||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)
|
|
||||||
});
|
|
||||||
mSendNoteButton.setBackgroundTintList(bgButtonColor);
|
|
||||||
mSendNoteButton.setTextColor(textButtonColor);
|
|
||||||
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {
|
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public class FeatureCategoryFragment
|
|||||||
// Duplicate of showNoobDialog()
|
// Duplicate of showNoobDialog()
|
||||||
private void showNoteConfirmationDialog(double lat, double lon, String noteText)
|
private void showNoteConfirmationDialog(double lat, double lon, String noteText)
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_share_to_all_dialog_title)
|
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class FromToTimePicker
|
|||||||
.setTitleText(title)
|
.setTitleText(title)
|
||||||
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
||||||
.setInputMode(mInputMode)
|
.setInputMode(mInputMode)
|
||||||
.setTheme(R.style.MwmTheme_MaterialTimePicker)
|
.setTheme(R.style.MwmMain_MaterialTimePicker)
|
||||||
.setHour((int) time.hours)
|
.setHour((int) time.hours)
|
||||||
.setMinute((int) time.minutes);
|
.setMinute((int) time.minutes);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import java.util.Comparator;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||||
@@ -41,9 +40,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
|||||||
LocaleListCompat systemLocales = ConfigurationCompat.getLocales(config);
|
LocaleListCompat systemLocales = ConfigurationCompat.getLocales(config);
|
||||||
|
|
||||||
List<Language> languages = new ArrayList<>();
|
List<Language> languages = new ArrayList<>();
|
||||||
List<Language> systemLanguages = new ArrayList<>(systemLocales.size());
|
List<Language> systemLanguages = new ArrayList<>();
|
||||||
for (int i = 0; i < systemLocales.size(); i++)
|
|
||||||
systemLanguages.add(null);
|
|
||||||
|
|
||||||
for (Language lang : Editor.nativeGetSupportedLanguages(false))
|
for (Language lang : Editor.nativeGetSupportedLanguages(false))
|
||||||
{
|
{
|
||||||
@@ -52,10 +49,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
|||||||
{
|
{
|
||||||
Locale locale = systemLocales.get(i);
|
Locale locale = systemLocales.get(i);
|
||||||
if (locale != null && locale.getLanguage().equals(lang.code))
|
if (locale != null && locale.getLanguage().equals(lang.code))
|
||||||
{
|
systemLanguages.add(lang);
|
||||||
systemLanguages.add(i, lang);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existingLanguages.contains(lang.code) || systemLanguages.contains(lang))
|
if (existingLanguages.contains(lang.code) || systemLanguages.contains(lang))
|
||||||
@@ -66,7 +60,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
|||||||
|
|
||||||
Collections.sort(languages, Comparator.comparing(lhs -> lhs.name));
|
Collections.sort(languages, Comparator.comparing(lhs -> lhs.name));
|
||||||
|
|
||||||
languages.addAll(0, systemLanguages.stream().filter(Objects::nonNull).toList());
|
languages.addAll(0, systemLanguages);
|
||||||
|
|
||||||
return new LanguagesAdapter(this, languages.toArray(new Language[languages.size()]));
|
return new LanguagesAdapter(this, languages.toArray(new Language[languages.size()]));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class OsmLoginFragment extends BaseMwmToolbarFragment
|
|||||||
|
|
||||||
private void onAuthFail()
|
private void onAuthFail()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_login_error_dialog)
|
.setTitle(R.string.editor_login_error_dialog)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.os.Bundle;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
@@ -22,7 +23,6 @@ import app.organicmaps.util.Utils;
|
|||||||
import app.organicmaps.util.WindowInsetUtils;
|
import app.organicmaps.util.WindowInsetUtils;
|
||||||
import app.organicmaps.widget.StackedButtonDialogFragment;
|
import app.organicmaps.widget.StackedButtonDialogFragment;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
import com.google.android.material.progressindicator.CircularProgressIndicator;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class ProfileFragment extends BaseMwmToolbarFragment
|
|||||||
private MaterialTextView mEditsSent;
|
private MaterialTextView mEditsSent;
|
||||||
private MaterialTextView mProfileName;
|
private MaterialTextView mProfileName;
|
||||||
private ShapeableImageView mProfileImage;
|
private ShapeableImageView mProfileImage;
|
||||||
private CircularProgressIndicator mProfileInfoLoading;
|
private ProgressBar mProfileInfoLoading;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import android.widget.LinearLayout;
|
|||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.IntRange;
|
import androidx.annotation.IntRange;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@@ -24,7 +25,6 @@ import app.organicmaps.sdk.util.Utils;
|
|||||||
import app.organicmaps.util.UiUtils;
|
import app.organicmaps.util.UiUtils;
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -195,7 +195,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
|
|
||||||
SparseArray<MaterialCheckBox> days = new SparseArray<>(7);
|
SparseArray<MaterialCheckBox> days = new SparseArray<>(7);
|
||||||
View allday;
|
View allday;
|
||||||
MaterialSwitch swAllday;
|
SwitchCompat swAllday;
|
||||||
View schedule;
|
View schedule;
|
||||||
View openClose;
|
View openClose;
|
||||||
View open;
|
View open;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class FaqFragment extends BaseMwmFragment
|
|||||||
FloatingActionButton feedbackFab = root.findViewById(R.id.feedback_fab);
|
FloatingActionButton feedbackFab = root.findViewById(R.id.feedback_fab);
|
||||||
feedbackFab.setOnClickListener(
|
feedbackFab.setOnClickListener(
|
||||||
v
|
v
|
||||||
-> new MaterialAlertDialogBuilder(requireActivity())
|
-> new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.feedback)
|
.setTitle(R.string.feedback)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.setItems(new CharSequence[] {getString(R.string.feedback_general), getString(R.string.report_a_bug)},
|
.setItems(new CharSequence[] {getString(R.string.feedback_general), getString(R.string.report_a_bug)},
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ package app.organicmaps.maplayer;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import androidx.annotation.AttrRes;
|
||||||
import androidx.annotation.DrawableRes;
|
import androidx.annotation.DrawableRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.adapter.OnItemClickListener;
|
import app.organicmaps.adapter.OnItemClickListener;
|
||||||
import app.organicmaps.sdk.maplayer.Mode;
|
import app.organicmaps.sdk.maplayer.Mode;
|
||||||
|
import app.organicmaps.util.ThemeUtils;
|
||||||
|
|
||||||
public class LayerBottomSheetItem
|
public class LayerBottomSheetItem
|
||||||
{
|
{
|
||||||
@@ -35,24 +37,26 @@ public class LayerBottomSheetItem
|
|||||||
@DrawableRes
|
@DrawableRes
|
||||||
int drawableResId = 0;
|
int drawableResId = 0;
|
||||||
@StringRes
|
@StringRes
|
||||||
int buttonTextResource = switch (mode) {
|
int buttonTextResource = R.string.layers_title;
|
||||||
case OUTDOORS -> {
|
switch (mode)
|
||||||
|
{
|
||||||
|
case OUTDOORS:
|
||||||
drawableResId = R.drawable.ic_layers_outdoors;
|
drawableResId = R.drawable.ic_layers_outdoors;
|
||||||
yield R.string.button_layer_outdoor;
|
buttonTextResource = R.string.button_layer_outdoor;
|
||||||
}
|
break;
|
||||||
case SUBWAY -> {
|
case SUBWAY:
|
||||||
drawableResId = R.drawable.ic_layers_subway;
|
drawableResId = R.drawable.ic_layers_subway;
|
||||||
yield R.string.subway;
|
buttonTextResource = R.string.subway;
|
||||||
}
|
break;
|
||||||
case ISOLINES -> {
|
case ISOLINES:
|
||||||
drawableResId = R.drawable.ic_layers_isoline;
|
drawableResId = R.drawable.ic_layers_isoline;
|
||||||
yield R.string.button_layer_isolines;
|
buttonTextResource = R.string.button_layer_isolines;
|
||||||
}
|
break;
|
||||||
case TRAFFIC -> {
|
case TRAFFIC:
|
||||||
drawableResId = R.drawable.ic_layers_traffic;
|
drawableResId = R.drawable.ic_layers_traffic;
|
||||||
yield R.string.button_layer_traffic;
|
buttonTextResource = R.string.button_layer_traffic;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
return new LayerBottomSheetItem(drawableResId, buttonTextResource, mode, layerItemClickListener);
|
return new LayerBottomSheetItem(drawableResId, buttonTextResource, mode, layerItemClickListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class TrafficButtonController implements TrafficManager.TrafficCallback
|
|||||||
if (mDialog != null && mDialog.isShowing())
|
if (mDialog != null && mDialog.isShowing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mDialog = new MaterialAlertDialogBuilder(mActivity)
|
mDialog = new MaterialAlertDialogBuilder(mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.common_check_internet_connection_dialog)
|
.setMessage(R.string.common_check_internet_connection_dialog)
|
||||||
.setPositiveButton(R.string.ok, (dialog, which) -> TrafficManager.INSTANCE.setEnabled(false))
|
.setPositiveButton(R.string.ok, (dialog, which) -> TrafficManager.INSTANCE.setEnabled(false))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ abstract class BaseRoutingErrorDialogFragment extends BaseMwmDialogFragment
|
|||||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
public Dialog onCreateDialog(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
parseArguments();
|
parseArguments();
|
||||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity())
|
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setNegativeButton(android.R.string.cancel, null);
|
.setNegativeButton(android.R.string.cancel, null);
|
||||||
beforeDialogCreated(builder);
|
beforeDialogCreated(builder);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import app.organicmaps.R;
|
|||||||
import app.organicmaps.maplayer.MapButtonsViewModel;
|
import app.organicmaps.maplayer.MapButtonsViewModel;
|
||||||
import app.organicmaps.sdk.Framework;
|
import app.organicmaps.sdk.Framework;
|
||||||
import app.organicmaps.sdk.Router;
|
import app.organicmaps.sdk.Router;
|
||||||
|
import app.organicmaps.sdk.location.LocationHelper;
|
||||||
import app.organicmaps.sdk.maplayer.traffic.TrafficManager;
|
import app.organicmaps.sdk.maplayer.traffic.TrafficManager;
|
||||||
import app.organicmaps.sdk.routing.CarDirection;
|
import app.organicmaps.sdk.routing.CarDirection;
|
||||||
import app.organicmaps.sdk.routing.RoutingController;
|
import app.organicmaps.sdk.routing.RoutingController;
|
||||||
@@ -98,11 +99,6 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
|||||||
mSpeedLimit = topFrame.findViewById(R.id.nav_speed_limit);
|
mSpeedLimit = topFrame.findViewById(R.id.nav_speed_limit);
|
||||||
mCurrentSpeed = topFrame.findViewById(R.id.nav_current_speed);
|
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
|
// 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 navigationBarBackground = mFrame.findViewById(R.id.nav_bottom_sheet_nav_bar);
|
||||||
final View nextTurnContainer = mFrame.findViewById(R.id.nav_next_turn_container);
|
final View nextTurnContainer = mFrame.findViewById(R.id.nav_next_turn_container);
|
||||||
@@ -272,16 +268,18 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
|||||||
|
|
||||||
private void updateSpeedWidgets(@NonNull final RoutingInfo info)
|
private void updateSpeedWidgets(@NonNull final RoutingInfo info)
|
||||||
{
|
{
|
||||||
final Location location = MwmApplication.from(mFrame.getContext()).getLocationHelper().getSavedLocation();
|
final LocationHelper locationHelper = MwmApplication.from(mFrame.getContext()).getLocationHelper();
|
||||||
|
final Location location = locationHelper.getSavedLocation();
|
||||||
if (location == null)
|
if (location == null)
|
||||||
{
|
{
|
||||||
mSpeedLimit.setSpeedLimit(-1, false);
|
mSpeedLimit.setSpeedLimit(-1, false);
|
||||||
mCurrentSpeed.setCurrentSpeed(-1);
|
mCurrentSpeed.setCurrentSpeed(-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final double currentAvgSpeed = locationHelper.getAverageSpeed();
|
||||||
final int fSpeedLimit = StringUtils.nativeFormatSpeed(info.speedLimitMps);
|
final int fSpeedLimit = StringUtils.nativeFormatSpeed(info.speedLimitMps);
|
||||||
final boolean speedLimitExceeded = fSpeedLimit < StringUtils.nativeFormatSpeed(location.getSpeed());
|
final boolean speedLimitExceeded = fSpeedLimit < StringUtils.nativeFormatSpeed(currentAvgSpeed);
|
||||||
mSpeedLimit.setSpeedLimit(fSpeedLimit, speedLimitExceeded);
|
mSpeedLimit.setSpeedLimit(fSpeedLimit, speedLimitExceeded);
|
||||||
mCurrentSpeed.setCurrentSpeed(location.getSpeed());
|
mCurrentSpeed.setCurrentSpeed(currentAvgSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.StyleRes;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||||
|
import app.organicmaps.util.ThemeUtils;
|
||||||
|
|
||||||
public class SearchActivity extends BaseMwmFragmentActivity
|
public class SearchActivity extends BaseMwmFragmentActivity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ import android.view.View;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.XmlRes;
|
import androidx.annotation.XmlRes;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceFragmentCompat;
|
import androidx.preference.PreferenceFragmentCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
import app.organicmaps.util.WindowInsetUtils.ScrollableContentInsetsListener;
|
import app.organicmaps.util.WindowInsetUtils.ScrollableContentInsetsListener;
|
||||||
|
|
||||||
@@ -42,6 +44,7 @@ abstract class BaseXmlSettingsFragment extends PreferenceFragmentCompat
|
|||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
view.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.bg_cards));
|
||||||
RecyclerView recyclerView = getListView();
|
RecyclerView recyclerView = getListView();
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(recyclerView, new ScrollableContentInsetsListener(recyclerView));
|
ViewCompat.setOnApplyWindowInsetsListener(recyclerView, new ScrollableContentInsetsListener(recyclerView));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
|
||||||
|
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.base.BaseMwmToolbarFragment;
|
import app.organicmaps.base.BaseMwmToolbarFragment;
|
||||||
import app.organicmaps.sdk.routing.RoutingController;
|
import app.organicmaps.sdk.routing.RoutingController;
|
||||||
@@ -90,34 +88,34 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
|||||||
|
|
||||||
private void initViews(@NonNull View root)
|
private void initViews(@NonNull View root)
|
||||||
{
|
{
|
||||||
MaterialSwitch tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
SwitchCompat tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
||||||
tollsBtn.setChecked(RoutingOptions.hasOption(RoadType.Toll));
|
tollsBtn.setChecked(RoutingOptions.hasOption(RoadType.Toll));
|
||||||
CompoundButton.OnCheckedChangeListener tollBtnListener = new ToggleRoutingOptionListener(RoadType.Toll, root);
|
CompoundButton.OnCheckedChangeListener tollBtnListener = new ToggleRoutingOptionListener(RoadType.Toll, root);
|
||||||
tollsBtn.setOnCheckedChangeListener(tollBtnListener);
|
tollsBtn.setOnCheckedChangeListener(tollBtnListener);
|
||||||
|
|
||||||
MaterialSwitch motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
SwitchCompat motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
||||||
motorwaysBtn.setChecked(RoutingOptions.hasOption(RoadType.Motorway));
|
motorwaysBtn.setChecked(RoutingOptions.hasOption(RoadType.Motorway));
|
||||||
CompoundButton.OnCheckedChangeListener motorwayBtnListener =
|
CompoundButton.OnCheckedChangeListener motorwayBtnListener =
|
||||||
new ToggleRoutingOptionListener(RoadType.Motorway, root);
|
new ToggleRoutingOptionListener(RoadType.Motorway, root);
|
||||||
motorwaysBtn.setOnCheckedChangeListener(motorwayBtnListener);
|
motorwaysBtn.setOnCheckedChangeListener(motorwayBtnListener);
|
||||||
|
|
||||||
MaterialSwitch ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
SwitchCompat ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
||||||
ferriesBtn.setChecked(RoutingOptions.hasOption(RoadType.Ferry));
|
ferriesBtn.setChecked(RoutingOptions.hasOption(RoadType.Ferry));
|
||||||
CompoundButton.OnCheckedChangeListener ferryBtnListener = new ToggleRoutingOptionListener(RoadType.Ferry, root);
|
CompoundButton.OnCheckedChangeListener ferryBtnListener = new ToggleRoutingOptionListener(RoadType.Ferry, root);
|
||||||
ferriesBtn.setOnCheckedChangeListener(ferryBtnListener);
|
ferriesBtn.setOnCheckedChangeListener(ferryBtnListener);
|
||||||
|
|
||||||
MaterialSwitch dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
SwitchCompat dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
||||||
dirtyRoadsBtn.setChecked(RoutingOptions.hasOption(RoadType.Dirty));
|
dirtyRoadsBtn.setChecked(RoutingOptions.hasOption(RoadType.Dirty));
|
||||||
dirtyRoadsBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Paved) || RoutingOptions.hasOption(RoadType.Dirty));
|
dirtyRoadsBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Paved) || RoutingOptions.hasOption(RoadType.Dirty));
|
||||||
CompoundButton.OnCheckedChangeListener dirtyBtnListener = new ToggleRoutingOptionListener(RoadType.Dirty, root);
|
CompoundButton.OnCheckedChangeListener dirtyBtnListener = new ToggleRoutingOptionListener(RoadType.Dirty, root);
|
||||||
dirtyRoadsBtn.setOnCheckedChangeListener(dirtyBtnListener);
|
dirtyRoadsBtn.setOnCheckedChangeListener(dirtyBtnListener);
|
||||||
|
|
||||||
MaterialSwitch stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
SwitchCompat stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
||||||
stepsBtn.setChecked(RoutingOptions.hasOption(RoadType.Steps));
|
stepsBtn.setChecked(RoutingOptions.hasOption(RoadType.Steps));
|
||||||
CompoundButton.OnCheckedChangeListener stepsBtnListener = new ToggleRoutingOptionListener(RoadType.Steps, root);
|
CompoundButton.OnCheckedChangeListener stepsBtnListener = new ToggleRoutingOptionListener(RoadType.Steps, root);
|
||||||
stepsBtn.setOnCheckedChangeListener(stepsBtnListener);
|
stepsBtn.setOnCheckedChangeListener(stepsBtnListener);
|
||||||
|
|
||||||
MaterialSwitch pavedBtn = root.findViewById(R.id.avoid_paved_roads_btn);
|
SwitchCompat pavedBtn = root.findViewById(R.id.avoid_paved_roads_btn);
|
||||||
pavedBtn.setChecked(RoutingOptions.hasOption(RoadType.Paved));
|
pavedBtn.setChecked(RoutingOptions.hasOption(RoadType.Paved));
|
||||||
pavedBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Dirty) || RoutingOptions.hasOption(RoadType.Paved));
|
pavedBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Dirty) || RoutingOptions.hasOption(RoadType.Paved));
|
||||||
CompoundButton.OnCheckedChangeListener pavedBtnListener = new ToggleRoutingOptionListener(RoadType.Paved, root);
|
CompoundButton.OnCheckedChangeListener pavedBtnListener = new ToggleRoutingOptionListener(RoadType.Paved, root);
|
||||||
@@ -146,8 +144,8 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
|||||||
else
|
else
|
||||||
RoutingOptions.removeOption(mRoadType);
|
RoutingOptions.removeOption(mRoadType);
|
||||||
|
|
||||||
MaterialSwitch dirtyRoadsBtn = mRoot.findViewById(R.id.avoid_dirty_roads_btn);
|
SwitchCompat dirtyRoadsBtn = mRoot.findViewById(R.id.avoid_dirty_roads_btn);
|
||||||
MaterialSwitch pavedBtn = mRoot.findViewById(R.id.avoid_paved_roads_btn);
|
SwitchCompat pavedBtn = mRoot.findViewById(R.id.avoid_paved_roads_btn);
|
||||||
if (mRoadType == RoadType.Dirty)
|
if (mRoadType == RoadType.Dirty)
|
||||||
{
|
{
|
||||||
pavedBtn.setEnabled(!isChecked);
|
pavedBtn.setEnabled(!isChecked);
|
||||||
|
|||||||
@@ -4,23 +4,16 @@ import static app.organicmaps.leftbutton.LeftButtonsHolder.DISABLE_BUTTON_CODE;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
import androidx.preference.PreferenceManager;
|
|
||||||
import androidx.preference.TwoStatePreference;
|
import androidx.preference.TwoStatePreference;
|
||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
|
|
||||||
import app.organicmaps.MwmApplication;
|
import app.organicmaps.MwmApplication;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.dialog.CustomMapServerDialog;
|
|
||||||
import app.organicmaps.downloader.OnmapDownloader;
|
import app.organicmaps.downloader.OnmapDownloader;
|
||||||
import app.organicmaps.editor.LanguagesFragment;
|
import app.organicmaps.editor.LanguagesFragment;
|
||||||
import app.organicmaps.editor.ProfileActivity;
|
import app.organicmaps.editor.ProfileActivity;
|
||||||
@@ -42,7 +35,7 @@ import app.organicmaps.sdk.util.SharedPropertiesUtils;
|
|||||||
import app.organicmaps.sdk.util.log.LogsManager;
|
import app.organicmaps.sdk.util.log.LogsManager;
|
||||||
import app.organicmaps.util.ThemeSwitcher;
|
import app.organicmaps.util.ThemeSwitcher;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -80,7 +73,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
initScreenSleepEnabledPrefsCallbacks();
|
initScreenSleepEnabledPrefsCallbacks();
|
||||||
initShowOnLockScreenPrefsCallbacks();
|
initShowOnLockScreenPrefsCallbacks();
|
||||||
initLeftButtonPrefs();
|
initLeftButtonPrefs();
|
||||||
initCustomMapDownloadUrlPrefsCallbacks();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLeftButtonPrefs()
|
private void initLeftButtonPrefs()
|
||||||
@@ -494,7 +486,7 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
pref.setOnPreferenceClickListener(preference -> {
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
if (MapManager.nativeIsDownloading())
|
if (MapManager.nativeIsDownloading())
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloading_is_active)
|
.setTitle(R.string.downloading_is_active)
|
||||||
.setMessage(R.string.cant_change_this_setting)
|
.setMessage(R.string.cant_change_this_setting)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -543,34 +535,6 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initCustomMapDownloadUrlPrefsCallbacks()
|
|
||||||
{
|
|
||||||
Preference customUrlPref = getPreference(getString(R.string.pref_custom_map_download_url));
|
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(requireContext());
|
|
||||||
|
|
||||||
String current = prefs.getString(getString(R.string.pref_custom_map_download_url), "");
|
|
||||||
String normalizedUrl = Framework.normalizeServerUrl(current);
|
|
||||||
|
|
||||||
// Initial summary
|
|
||||||
customUrlPref.setSummary(normalizedUrl.isEmpty()
|
|
||||||
? getString(R.string.download_resources_custom_url_summary_none)
|
|
||||||
: normalizedUrl);
|
|
||||||
|
|
||||||
// Sync native
|
|
||||||
Framework.applyCustomMapDownloadUrl(requireContext(), normalizedUrl);
|
|
||||||
|
|
||||||
// Show dialog
|
|
||||||
customUrlPref.setOnPreferenceClickListener(preference -> {
|
|
||||||
CustomMapServerDialog.show(requireContext(), url -> {
|
|
||||||
preference.setSummary(url.isEmpty()
|
|
||||||
? getString(R.string.download_resources_custom_url_summary_none)
|
|
||||||
: url);
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void removePreference(@NonNull String categoryKey, @NonNull Preference preference)
|
private void removePreference(@NonNull String categoryKey, @NonNull Preference preference)
|
||||||
{
|
{
|
||||||
final PreferenceCategory category = getPreference(categoryKey);
|
final PreferenceCategory category = getPreference(categoryKey);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
|||||||
final String oldPath = storages.get(currentIndex).mPath;
|
final String oldPath = storages.get(currentIndex).mPath;
|
||||||
final String newPath = storages.get(newIndex).mPath;
|
final String newPath = storages.get(newIndex).mPath;
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setTitle(R.string.move_maps)
|
.setTitle(R.string.move_maps)
|
||||||
.setPositiveButton(R.string.ok, (dlg, which) -> moveStorage(newPath, oldPath))
|
.setPositiveButton(R.string.ok, (dlg, which) -> moveStorage(newPath, oldPath))
|
||||||
@@ -133,7 +133,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
|||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.move_maps_error)
|
.setTitle(R.string.move_maps_error)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
R.string.report_a_bug,
|
R.string.report_a_bug,
|
||||||
|
|||||||
25
android/app/src/main/java/app/organicmaps/util/RtlUtils.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package app.organicmaps.util;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.view.View;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.core.text.TextUtilsCompat;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class RtlUtils
|
||||||
|
{
|
||||||
|
private final static List<String> rtlLocalesWithTranslation = Arrays.asList("ar", "fa");
|
||||||
|
|
||||||
|
public static void manageRtl(@NonNull final Activity activity)
|
||||||
|
{
|
||||||
|
final String currentLanguage = Locale.getDefault().getLanguage();
|
||||||
|
final boolean isRTL =
|
||||||
|
TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;
|
||||||
|
if (isRTL && rtlLocalesWithTranslation.contains(currentLanguage))
|
||||||
|
activity.getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
|
||||||
|
else
|
||||||
|
activity.getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_LTR);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -90,6 +90,7 @@ public enum ThemeSwitcher
|
|||||||
{
|
{
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_YES);
|
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_YES);
|
||||||
|
else
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||||
|
|
||||||
if (RoutingController.get().isVehicleNavigation())
|
if (RoutingController.get().isVehicleNavigation())
|
||||||
@@ -103,6 +104,7 @@ public enum ThemeSwitcher
|
|||||||
{
|
{
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_NO);
|
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_NO);
|
||||||
|
else
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||||
|
|
||||||
if (RoutingController.get().isVehicleNavigation())
|
if (RoutingController.get().isVehicleNavigation())
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import androidx.annotation.ColorInt;
|
|||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
import androidx.core.graphics.Insets;
|
import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.WindowCompat;
|
import androidx.core.view.WindowCompat;
|
||||||
@@ -195,7 +196,7 @@ public final class UiUtils
|
|||||||
public static void showHomeUpButton(MaterialToolbar toolbar)
|
public static void showHomeUpButton(MaterialToolbar toolbar)
|
||||||
{
|
{
|
||||||
toolbar.setNavigationIcon(
|
toolbar.setNavigationIcon(
|
||||||
UiUtils.getStyledResourceId(toolbar.getContext(), androidx.appcompat.R.attr.homeAsUpIndicator));
|
ThemeUtils.getResource(toolbar.getContext(), androidx.appcompat.R.attr.homeAsUpIndicator));
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method returns the total height of the display (in pixels) including notch and other touchable areas
|
// this method returns the total height of the display (in pixels) including notch and other touchable areas
|
||||||
@@ -208,7 +209,15 @@ public final class UiUtils
|
|||||||
}
|
}
|
||||||
public static void setInputError(@NonNull TextInputLayout layout, @StringRes int error)
|
public static void setInputError(@NonNull TextInputLayout layout, @StringRes int error)
|
||||||
{
|
{
|
||||||
layout.setError(error == 0 ? null : layout.getContext().getString(error));
|
setInputError(layout, error == 0 ? null : layout.getContext().getString(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setInputError(@NonNull TextInputLayout layout, String error)
|
||||||
|
{
|
||||||
|
layout.getEditText().setError(error);
|
||||||
|
layout.getEditText().setTextColor(error == null
|
||||||
|
? ThemeUtils.getColor(layout.getContext(), android.R.attr.textColorPrimary)
|
||||||
|
: ContextCompat.getColor(layout.getContext(), R.color.base_red));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFullscreen(@NonNull Activity activity, boolean fullscreen)
|
public static void setFullscreen(@NonNull Activity activity, boolean fullscreen)
|
||||||
@@ -272,14 +281,6 @@ public final class UiUtils
|
|||||||
view.setPadding(systemInsets.left, systemInsets.top, systemInsets.right, view.getPaddingBottom());
|
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)
|
public static void setupNavigationIcon(@NonNull MaterialToolbar toolbar, @NonNull View.OnClickListener listener)
|
||||||
{
|
{
|
||||||
View customNavigationButton = toolbar.findViewById(R.id.back);
|
View customNavigationButton = toolbar.findViewById(R.id.back);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package app.organicmaps.widget;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import androidx.annotation.DrawableRes;
|
|||||||
import androidx.appcompat.content.res.AppCompatResources;
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.appcompat.widget.AppCompatRadioButton;
|
import androidx.appcompat.widget.AppCompatRadioButton;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
|
import app.organicmaps.util.ThemeUtils;
|
||||||
|
|
||||||
public class RoutingToolbarButton extends AppCompatRadioButton
|
public class RoutingToolbarButton extends AppCompatRadioButton
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class MyPositionButton
|
|||||||
{
|
{
|
||||||
case LocationState.PENDING_POSITION -> R.drawable.ic_menu_location_pending;
|
case LocationState.PENDING_POSITION -> R.drawable.ic_menu_location_pending;
|
||||||
case LocationState.NOT_FOLLOW_NO_POSITION -> R.drawable.ic_location_off;
|
case LocationState.NOT_FOLLOW_NO_POSITION -> R.drawable.ic_location_off;
|
||||||
case LocationState.NOT_FOLLOW -> R.drawable.ic_location_crosshair;
|
case LocationState.NOT_FOLLOW -> R.drawable.ic_not_follow;
|
||||||
case LocationState.FOLLOW -> R.drawable.ic_follow;
|
case LocationState.FOLLOW -> R.drawable.ic_follow;
|
||||||
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
|
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
|
||||||
default -> throw new IllegalArgumentException("Invalid button mode: " + mode);
|
default -> throw new IllegalArgumentException("Invalid button mode: " + mode);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class BookmarkColorDialogFragment extends BaseMwmDialogFragment
|
|||||||
mIconResId = getArguments().getInt(ICON_RES);
|
mIconResId = getArguments().getInt(ICON_RES);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new MaterialAlertDialogBuilder(requireActivity())
|
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setView(buildView())
|
.setView(buildView())
|
||||||
.setTitle(R.string.choose_color)
|
.setTitle(R.string.choose_color)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ public class PlacePageController
|
|||||||
mAlertDialog.show();
|
mAlertDialog.show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(requireContext())
|
mAlertDialog = new MaterialAlertDialogBuilder(requireContext(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(requireContext().getString(R.string.delete_track_dialog_title, mMapObject.getTitle()))
|
.setTitle(requireContext().getString(R.string.delete_track_dialog_title, mMapObject.getTitle()))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||