Dark mode has become a trend in modern day websites (pun intended, i'm so funny ðĪŠ). Recently, I worked on a project where we had a highly customized Google Map. There were a lot of Map and DOM interactions along with styling. A lot went into it. ðĨī
While studying how to style Google Maps, I stumbled across a very good resource that gives you readymade Google Maps styles, including Night Mode
.
Introducing, Google Maps Styling Wizard! ðð
How To ðąâð
Literally, select any style you want and click on the Finish
button. It gives styles for the selected map theme in JSON format. After that, all you have to do is this.
const map = new google.maps.Map(element, {
styles: [...], // Paste your styles here!
});
Of course, make sure to set appropriate zoom level, position coordinates and API keys etc.
PS, the JSON formats are also a good way to learn how to style your maps. For more info, look into the official Google Map styling guide.
Top comments (2)
Thanks for sharing. Another good resource for map styles is snazzymaps.com/. Highly customizable, great community, easy to use.
Thanks for sharing this! ð