I am using Web AppBuilder 2.6 to create a widget.
I have an ArcGIS Map Service that contains the name of several companies and their offices' location in north America. The user interface provides a list of the company names, the user selects a company name and the service returns the offices' location for the requested company name and then the new layer is added to the map. In some instances, the offices are located in one state in other instances the offices are located all across North America.
My question is how can I find the appropriate extent so that all offices' locations are present under the presented map?