view.popup.visibleElements featureNavigation not working

293
1
Jump to solution
06-21-2023 11:50 PM
LH001
by
New Contributor

Hello everyone,

 

I have the problem that my featureNavigation bar is still showing after I set it to false:

LH001_0-1687416558793.png

 

const view = new MapView({
map: map,
container: "viewDiv", // Div element
center: [9.0000, 48.6000], // Longitude, latitude
zoom: 8, // Zoom level
constraints: {
maxZoom: 6, // Max Zoom Out
minZoom: 11 // Min Zoom In
},
popup: {
visibleElements: {
closeButton: false,
featureNavigation: false
},
collapseEnabled: false,
dockEnabled: true,
dockOptions: {
// Disables the dock button from the popup
buttonEnabled: false,
// Ignore the default sizes that trigger responsive docking
breakpoint: false,
position: 'top-right'
}
}
 
Does somebody know why it behaves like that?
0 Kudos
1 Solution

Accepted Solutions
LH001
by
New Contributor

Found it out myself.

the entire const view must be placed at the end of the script, after the layers have been added to the map.

Additionally after changing the code - the view.popup.watch was not working anymore and I had to replace it with

reactiveUtils.watch(() => view.popup?.visible, function(e) {}

View solution in original post

0 Kudos
1 Reply
LH001
by
New Contributor

Found it out myself.

the entire const view must be placed at the end of the script, after the layers have been added to the map.

Additionally after changing the code - the view.popup.watch was not working anymore and I had to replace it with

reactiveUtils.watch(() => view.popup?.visible, function(e) {}
0 Kudos