Ability to provide custom map tiles source and attribution #748
Replies: 6 comments 1 reply
-
Hi Steve, Pleased you like the three options, I agree with you that the current tiles are too bright and that was one of the reasons behind issue #630 where certain options and values can be stored in the database, in this case, for example, storing map server URLs this table has been added into the code and migrations see https://github.com/magicbug/Cloudlog/wiki/Development-Notes however I need to finish writing the code for loading the config items for use (weekends task) because of this I won't be accepting any PRs that change a /application/config file as the project needs to move away from that. As for the copyright, we have to be mindful of the licence agreements for libraries used, I will add this copyright tag as an option but won't be making it a user changeable item without going to the database to change it, the onus will then be on the end-user if they change anything. Peter. |
Beta Was this translation helpful? Give feedback.
-
Great, that sounds perfect. By having the ability to change the map tile source and attribution, even if only through the database, it keeps me from having to hack at the code for darker map tiles. And by doing as you say and not exposing the option outside of the database, it'll ensure that any licensing issues are the responsibility of the end user since you would not be offering choices, but a crafty user could sign up for a different map source and customize it to their liking. In addition to the map tiles and map attribution, would you consider adding options in the db to allow the coloring of the gridlines, shading and font to be adjusted. I found that the default red/green was far too intense when using dark tiles and therefore I modified the color scheme as well. Screenshot below is worth 1000 words ;) And one final idea.. Could you possibly use css with the default OSM map tile server to darken things up? Maybe something like a 50% grayscale filter applied to the map tiles via the theme CSS? I hope I don't start getting annoying. I am very impressed with the quality of this app and, as a developer myself, I have a bunch of ideas lol. 73s |
Beta Was this translation helpful? Give feedback.
-
Happy to try darken the current tiles up, if you want to add some code that if its a dark theme to add it then I'm game 👍🏻 to accepting a PR. But yes think its a reasonable compromise, other thing is to actually turn all maps off for those who want to run Cloudlog without internet access and no internal tile servers! |
Beta Was this translation helpful? Give feedback.
-
As for the code quality I try, there's some parts that really need cleaned up and some SQL queries that could be improved but it will get there :) |
Beta Was this translation helpful? Give feedback.
-
@magicbug I want to get your opinion on the darker tiles for the 3 dark themes.. I used CSS only to change to tiles using the default tile servers. The only non-css code change is to add css classNames to the L.Rectangle calls in leaflet so that we can use CSS to override the default. Nothing is changed for non-dark themes, but, using overrides.css, I change the tile appearance on each of the 3 dark themes. I spun up a test instance if you would please be so kind as to tell me what you think and if you would like me to submit a PR for it or if the appearance needs to be tweaked. https://www.kn4goi.net/log-test/index.php The username/password is the default m0abc / demo account. Please try all three dark themes because the tiles are a little different for each and let me know what you think! |
Beta Was this translation helpful? Give feedback.
-
@hairlesshobo just to say that just made a commit to add map tile and the copyright to "options" table and I think I've attached most of the codebase so that it uses the tile URL. haven't made this changeable in the frontend yet but if you arent scared of MySQL you'll find it. |
Beta Was this translation helpful? Give feedback.
-
So, I love that you guys have a dark theme for Cloudlog.. honestly, far too many sites/apps these days have a dark theme. Kudos for having not just one, but 3 choices!
With that said, the stock map is a little bright for a dark theme. I was able to sign up for a free tier dark tile provider and manually modify the (several) references to the map tiles source and attribution in order to get a nice dark theme map. But now, I can't auto-update the app because of code changes..
An example of how the map can look with a nice dark theme tile provider..
Would it be acceptable to add a configuration option somewhere that would allow one to override the map tiles and attribution? Ideally, I would think this config value should be in the config.php file and really doesn't need to be in the UI anywhere, since I imagine this wouldn't be heavily used and would require someone to sign up for a map provider elsewhere in order to use this feature. Now, I know that this would be a low priority, so with that said.. would you be interested in me providing a PR to add this config option so that the core team doesn't have to do any work?
Thanks in advance!
73s
Steve
Beta Was this translation helpful? Give feedback.
All reactions