diff --git a/README.md b/README.md index d344b0c0..0bc99e16 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ Feel free to change them both in the Account section. | ENV var name | Description | |-----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| | MIN_MINUTES_SPENT_IN_CITY | minimum minutes between two points to consider them as visited the same city, e.g. `60` | -| MAP_CENTER | default map center, e.g. `[55.7522, 37.6156]` | | TIME_ZONE | time zone, e.g. `Europe/Berlin`, full list is [here](https://github.com/Freika/dawarich/issues/27#issuecomment-2094721396) | | APPLICATION_HOST | host of the application, e.g. `localhost` or `dawarich.example.com` | | BACKGROUND_PROCESSING_CONCURRENCY (only for dawarich_sidekiq service) | Number of simultaneously processed background jobs, default is 10 | diff --git a/app/javascript/controllers/maps_controller.js b/app/javascript/controllers/maps_controller.js index b9c88b55..1b494cac 100644 --- a/app/javascript/controllers/maps_controller.js +++ b/app/javascript/controllers/maps_controller.js @@ -9,8 +9,8 @@ export default class extends Controller { console.log("Map controller connected"); const markers = JSON.parse(this.element.dataset.coordinates); - let center = markers[markers.length - 1] || JSON.parse(this.element.dataset.center); - center = center === undefined ? [52.514568, 13.350111] : center; + // The default map center is Victory Column in Berlin + let center = markers[markers.length - 1] || [52.514568, 13.350111] const timezone = this.element.dataset.timezone; const clearFogRadius = this.element.dataset.fog_of_war_meters; diff --git a/app/views/map/index.html.erb b/app/views/map/index.html.erb index ce318a3e..9c93f417 100644 --- a/app/views/map/index.html.erb +++ b/app/views/map/index.html.erb @@ -43,7 +43,6 @@ class="w-full" data-controller="maps" data-coordinates="<%= @coordinates %>" - data-center="<%= MAP_CENTER %>" data-timezone="<%= Rails.configuration.time_zone %>" data-meters_between_routes="<%= current_user.settings['meters_between_routes'] %>" data-minutes_between_routes="<%= current_user.settings['minutes_between_routes'] %>" diff --git a/config/initializers/00_constants.rb b/config/initializers/00_constants.rb index 52eae22b..803dd0f1 100644 --- a/config/initializers/00_constants.rb +++ b/config/initializers/00_constants.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true MIN_MINUTES_SPENT_IN_CITY = ENV.fetch('MIN_MINUTES_SPENT_IN_CITY', 60).to_i -MAP_CENTER = ENV.fetch('MAP_CENTER', '[55.7522, 37.6156]') REVERSE_GEOCODING_ENABLED = ENV.fetch('REVERSE_GEOCODING_ENABLED', 'true') == 'true' diff --git a/docs/How_to_install_Dawarich_on_Synology.md b/docs/How_to_install_Dawarich_on_Synology.md index 8a2a5d68..092da5f2 100644 --- a/docs/How_to_install_Dawarich_on_Synology.md +++ b/docs/How_to_install_Dawarich_on_Synology.md @@ -66,11 +66,10 @@ If you don't yet have DNS server you can install [Synology DNS](https://www.syno 1. Open /[Docker root folder](#docker-root-share)/[Dawarich root folder](#dawarich-root-folder)/.env file in any text editor. For example, you can use [Text editor](https://www.synology.com/en-global/dsm/packages/TextEditor) package or download it from **File station**, edit locally and upload it back, or get access by file share. 2. Change `APPLICATION_HOST` value to your **Dawarich hostname** that you set in **Web station**. In example above **dawarich.my-syno.com**. 3. Set your current `TIME_ZONE`. Full list [here](https://github.com/Freika/dawarich/issues/27#issuecomment-2094721396). -4. Set `MAP_CENTER`. This is your default location. Open Google Maps, click to random point and copy coordinates from popup or address line. -5. Optionally change `DATABASE_USERNAME`, `DATABASE_USERNAME`, `DATABASE_NAME`. +4. Optionally change `DATABASE_USERNAME`, `DATABASE_USERNAME`, `DATABASE_NAME`. -6. Click on name of your project. -7. Open **YAML Configurations** tab. +5. Click on name of your project. +6. Open **YAML Configurations** tab. # Run 1. Open **Container Manager** -> **Projects** ->**dawarich**