I just started to use HereMaps and my adventure to mix JavaScript and Typescript with Angular. My maps render proper with other settings but I can't set the max and min zoom level. I read that I can set max and min levels of a Layer, but where are the properties to set max and min zoom for the map?
let defaultLayers = this.platform.createDefaultLayers();
let map = new H.Map(
this.mapElement.nativeElement,
defaultLayers.vector.normal.map,
{
zoom: 10,
center: { lat: this.lat, lng: this.lng },
renderBaseBackground: {lower: 2, higher: 2}
}
);
map.getViewModel().setLookAtData({
tilt: 30
});
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
var ui = H.ui.UI.createDefault(map, defaultLayers);
map.addLayer(new H.map.layer.Layer({
min: 3,
max: 7
}));
Any ideas on how to set it?
You can achieve it (e.g. from 8 zoom to 10 zoom) with this code this code:
or