ERROR
When loading a web map containing widgets, the following error message is returned:
Error: Error: Tried to register widget with id== but that id is already registered
This error occurs if the ID used to register a widget already exists in the system, or when attempting to create multiple widgets with the same HTML element ID.
Functions or objects may attempt to call a different widget that contains a similar ID, which has been registered, when executed. Despite performing different tasks, the system detects the conflicts in the ID and returns the error message, preventing users from overwriting the registered widget.
For example, the Legend widget and LayerList widget is defined with the same HTML element ID, legendDiv.
function destroyEditor() { if (editorWidget) { editorWidget.destroy(); editorWidget = null; } }
Get help from ArcGIS experts
Download the Esri Support App