After upgrading to the v3.1 Javascript SDK with vector/WebGL rendering, there is now no terrain layer in the default UI Controls.
I have looked into the API documentation but there is no clear example that I could find that shows how to specify what shows up in the UI Controls.
var platform = new H.service.Platform({
apikey: 'key'
});
var layers = platform.createDefaultLayers();
var hereMap = new H.Map(
document.getElementById(mapCanvasDiv),
defaultLayers.vector.normal.map,
{
zoom: mapOptions.zoom,
center: mapOptions.center
});
var ui = H.ui.UI.createDefault(hereMap, defaultLayers);
// Guessing I can change "ui" in some way to include the terrain layer which is a raster layer.
hereMap.UIControls = ui;
I'd like to have Normal, Terrain and Satellite layers in the UI Controls like when we were on v3.0 as some of our customers use this layer.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…