Select to view content in your preferred language

Not able to hide zoomto button on popup

832
2
05-12-2021 07:09 AM
GiovanniVanore1
Emerging Contributor

Hello Guys,

I am using arcGIS 4.19 with ES module. Trying to hide default Zoomto button.

used code: 

view.popup.dividedActions.inlineActions.items[0].className = "hideZoomTO"
view.popup.dividedActions.inlineActions.items[0].visible = false;
this.view.popup.viewModel.allActions.getItemAt(0).visible = false
 
These all code are working but taking sometime. That means Its hiding but taking some micro seconds to hide the button.
 
Is there any method to hide the default button. 
0 Kudos
2 Replies
ReneRubalcava
Honored Contributor

You can set the PopupTemplate overWriteActions to true and don't provide an actions array.

https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#overwriteActio...

This will remove it.

Paco
by
Frequent Contributor

Here is another option that worked great for me-

view.popup.visibleElements = {
actionBar: false,
};

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#VisibleElement...

0 Kudos