Problem: Unable to geosearch locations outside the extent of embedded web maps
When a web map is embedded in a website, attempting to geosearch an address using the Location Search bar fails if the address is located outside the current extent of the web map.
By design, the default HTML code generated when embedding a web map in a website includes a 'searchextent' parameter that is set to 'true', limiting geosearches to the current extent of the web map. Therefore, the expected result of the geosearch is not returned when searching for an address not located within the extent of the web map.
Solution or Workaround
To geosearch locations outside the extent of embedded web maps, users must disable the 'searchextent' parameter in the HTML code of the web map by setting the parameter to 'false' before embedding the web map in the website. To do so, follow the steps provided below.
- Open the web map, and zoom in or out to set the desired extent. This step is not necessary if using the default extent of the web map.
- Click the Share button to open the Share window.
- In the Share window, under the 'Embed this map' option, click the EMBED IN WEBSITE button.
- In the Embed in Website window, check the Current Extent check box under the Location Search map option.
The Current Extent check box does not appear until the Location Search check box is selected.
- Change the 'searchextent' parameter from 'true' to 'false'.
- Embed the web map in the website.
Alternatively, the web map can also be published as a web application. For more information, refer to HowTo: Embed an ArcGIS Online web application in a website.