Search code examples
javascriptdictionaryopenlayers

Change OpenLayers map style


I am trying to create a map in OpenLayers. I have no problem with other APIs, but the map style is old. Also, there is another application named Snap (it's using OSM) that has a prettier style:

Left image is Snap, Right image is my map

How can I change OpenLayers map style?


Solution

  • You have to change the layer being displayed or the map. Different API's provide different layers that might have multiple styles.

    For example here: https://cloud.maptiler.com/maps/