0

I'm using the HERE JS library for mapping. I'd like to add an option into the MapSettingsControl to select the POI Map, as shown at https://developer.here.com/documentation/map-tile/dev_guide/topics/example-poi-tile.html

It seems you need to append "&pois" to the tile requests in order to get this.

I've followed the example in How do I get a Terrain Map in UI Controls HERE Maps v3.1 to create a new selectable map style in the MapSettingsControl.

However, it seems you can only select the map style name and cannot append arguments. Specifically, I cannot see a way of appending the &pois argument to the tile request to get the POI tiles.

Any suggestions?

Sam Crawford
  • 311
  • 4
  • 16

1 Answers1

0

Ah, I found the answer, but it's a bit fiddly.

var maptypes = platform.createDefaultLayers();
var poi = platform.createDefaultLayers({pois:true});

ui.removeControl("mapsettings");

// create custom one
var ms = new H.ui.MapSettingsControl( {
    baseLayers : [ { 
      label:"Normal", layer: maptypes.vector.normal.map
    },
    {
      label:"POI", layer: poi.raster.normal.map
    },
    ],
  layers : [{
        label: "layer.traffic", layer: maptypes.vector.normal.traffic
    },
    {
        label: "layer.incidents", layer: maptypes.vector.normal.trafficincidents
    }
]
  });
ui.addControl("customized",ms);
Sam Crawford
  • 311
  • 4
  • 16