Search code examples
here-api

How to remove all colors from Here Maps base layer?


How to remove all colors from Here Maps base layer? I do not want to see the freeways in pink or the streets in yellow. I want a custom grey color layer on the map.


Solution

  • The HERE Map Tile API lets you choose different styles though you cannot completely customize the color selection (yet).

    For example, here is the reduced-day style that removes pink freeways and yellow streets.

    enter image description here

    This is how it's done with the JavaScript API:

    //...create your own layer (with e.g. the "reduced" scheme
    var reduced = platform.getMapTileService({
      type: 'base'
    }).createTileLayer("maptile", "reduced.day", 256, "png8");
    
    //Step 2: initialize a map using your custom map tile layer
    var map = new H.Map(document.getElementById('mapp'), reduced, {
      center: {
        lat: 52.3,
        lng: 13.8
      },
      zoom: 10
    });