1

I want to implement a OSM into QGIS via an WMS service. We see that this is easy, right? I thought so too. In my case I want to implement a night mode map, like you would find in Google Maps when you drive at night time. Not entirely "black matter" but more of a "dark blue modern intuitive"-design if you know what I mean. As you can see in the image, the style should be something like this.

I can't seem to find any WMS that fit my needs. I tried using QMS (QGIS Map Services Plugin) which lists you all the potential WMS based on keywords. None of them fit my description. Do you have any idea on how to tackle this problem? Bear in mind, my programming skills are limited so I hope for something which is already available and implementable.

enter image description here

2
  • 1
    You must create alternative styles for the night mode and select them with WMS &STYLES= parameter. Or base your service on vector tiles and make your client to select the alternative styles. Somebody must still make the styles first.
    – user30184
    Commented Feb 17, 2022 at 14:31
  • 3
    Please don't repost closed question, but improve the closed ones by editing and including missing informations. Thank you.
    – Erik
    Commented Feb 17, 2022 at 14:40

1 Answer 1

3

Since QGIS 3.22, there is the option to 'Invert colors' in raster layer symbology.

It's not perfect, but a quick way to get started with a Night Mode could be to check the Invert colors option on the OpenStreetMap layer. Play around with the Gamma and Colorize options to tweak the colours.

enter image description here

5
  • Ok this seems interesting, tried it out but for me the "invert colors" is not available. Do you know why?
    – Hans Swent
    Commented Feb 17, 2022 at 15:10
  • 1
    Apologies, I should have included my QGIS version in my answer. It is a feature added in a recent update.
    – Matt
    Commented Feb 17, 2022 at 15:10
  • No problem, I also checked and I dont have the most recent version so I am updating it right now. But I still can't seem to believe that there isn't an optimal "night mode" version already existing. Working around with changing the layer styling seems suboptimal for me. Google Maps and many other services also have a night mode implemented. Is "night mode" so unusual that nobody works with it?
    – Hans Swent
    Commented Feb 17, 2022 at 15:13
  • Another option that works for older QGIS versions as well is using blending modes: create a dark gray background behind the OSM layer, than set the OSM layer to blending mode e.g. Burn. You might duplicate this OSM layer to duplicate the effect or maybe use another blending mode.
    – Babel
    Commented Dec 2, 2022 at 9:31
  • Wow very useful to know this, since the OS mastermap Dark/Night style was officially retired.
    – Theo F
    Commented Nov 29, 2023 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.