Benjamin-Loison / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
0 stars 0 forks source link

How to force update OpenStreetMap data? #4

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

First could answer the question what is the update frequency. To do so can write down when I notice such an update. Is last update retrievable from Settings? Yes in OpenStreetMap profile:

Cartographic data from OpenStreetMap as of 12/13/23.

grep -ri 'Cartographic data from OpenStreetMap as of'
android/app/src/main/res/values/strings.xml:    <string name="osm_presentation">Cartographic data from OpenStreetMap as of %s. OSM is like Wikipedia for maps, where you can add and edit places for users around the world.</string>
data/strings/strings.txt:    en = Cartographic data from OpenStreetMap as of %@. OSM is like Wikipedia for maps, where you can add and edit
Framework.getDataVersion()

Source: https://github.com/Benjamin-Loison/organicmaps/blob/4ff5fbcd2b204286e39c1d8fa4eaaa14eb88ba5b/android/app/src/main/java/app/organicmaps/editor/OsmLoginFragment.java#L58

grep -rw 'getDataVersion'
android/app/src/main/java/app/organicmaps/car/screens/settings/HelpScreen.java:        .addText(DateUtils.getShortDateFormatter().format(Framework.getDataVersion()))
android/app/src/main/java/app/organicmaps/editor/OsmLoginFragment.java:    final String dataVersion = DateUtils.getShortDateFormatter().format(Framework.getDataVersion());
android/app/src/main/java/app/organicmaps/Framework.java:  public static Date getDataVersion()
android/app/src/main/java/app/organicmaps/help/HelpFragment.java:    final String dataVersion = DateUtils.getShortDateFormatter().format(Framework.getDataVersion());

https://github.com/Benjamin-Loison/organicmaps/blob/4ff5fbcd2b204286e39c1d8fa4eaaa14eb88ba5b/android/app/src/main/java/app/organicmaps/Framework.java#L216-L228

grep -rw 'nativeGetDataVersion'
android/app/src/main/java/app/organicmaps/Framework.java:  private static native long nativeGetDataVersion();
android/app/src/main/java/app/organicmaps/Framework.java:    long dataVersion = nativeGetDataVersion();

The Stack Overflow answer 30635871 seems to indicate that it is possibly related to the OrganicMaps .apk version itself?

https://f-droid.org/en/packages/app.organicmaps/#latest

The latest .apk from F-Droid seems to have been published on 2023.09.22 which contradicts previous statement but confirm the memory that we can update the OpenStreetMap data from OrganicMaps itself. The question is to what native nativeGetDataVersion resolves to?

+4

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. For example: I'm always frustrated when [...]

Describe the ideal solution A clear and concise description of what you want to see in Organic Maps.

Describe alternatives you have considered

Additional context Add any other context or screenshots about the feature request here.

Benjamin-Loison commented 2 months ago

Related to Benjamin_Loison/fdroiddata/issues/8.