ArcGIS Web Editor is a slick new web-based editing application available in ArcGIS Online and now…(drum roll please) ArcGIS Enterprise 11.3 and higher. Whichever option you choose, Web Editor provides a streamlined online editing experience. With ArcGIS Enterprise, you can use custom URL parameters to further tailor that experience. You can set the initial extent of the map, zoom a specific location, and more. In this article, we’ll cover some URL basics, explore URL parameters in Web Editor, and review some best practices. Let’s dig in.
URL Parameters 101
In this section, we’ll cover some basics to set the stage for using URL parameters with applications like Web Editor. If you already know your way around a URL parameter, we recommend you skip ahead to Section 2: URL Parameters in Web Editor.
A URL is essentially a web page address. Let’s take a basic address… you can think of it as the cake:
- 101 Easy Street
Next, we’ll add extra details like an Apartment number. You can think of that as the icing:
- 101 Easy Street, Apt A
If this were a web address, it might look like this:
Notice the question mark (?) in the example. Everything before the question mark is the basic address, or the cake. Everything after the question mark is a parameter, or the icing.
Key-Value Pairs
Parameters generally follow the same formula. They contain a key, an equals sign (=), and a value. In technical jargon, these are referred to as key-value pairs. Key-value pairs are defined like so: key1= value1. In the example above, the key is Apt, and the value is A. Together, they form the key-value pair Apt=A.
In the next example, the key is web map, and the value is the alphanumeric code, or web map ID, that follows:
Mix and Match Parameters
You can string multiple parameters together by placing an ampersand (&) between the key-value pairs, like so:
- key1=value1&key2=value2
URL Parameters in Web Editor
Web Map URL
In Web Editor, everything begins with a web map. You add editable layers to a web map in Map Viewer, style the layers, and configure elements like labels and forms. When the map is polished and ready for editing, you open it in Web Editor. The address bar contains a URL that serves as a unique identifier for that map in Web Editor. Like fingerprints, no two URLs are the same. With some basic copy and paste skills, you can share a web map URL with others so they can open the same web map directly in Web Editor.
To copy the web map URL:
- Open the map in Web Editor
- Place the cursor in the Address bar
- Right click and select Copy (or Ctrl+C)
- Next, Paste the URL into a document where you can view and customize it
Your webmap URL might look something like this, with a few differences reflecting your organization and the webmap ID:
Now that you have the basic address, you can add on additional parameters to gain control over specific map behaviors. In Web Editor, you can use URL parameters to:
- Open a specific web map
- Define the map extent
- Zoom to a location
- Zoom to a feature, and
- Connect to a specific version
Remember to string additional parameters together using the ampersand (&).
1. Open a Web Map
To launch a specific web map in Web Editor use the key web map, followed by the web map ID. Hint: To find a web map ID, see the previous section on Web Map URLs.
Key-value pair: webmap=webmap ID
- https://organization.example.com/portal/apps/webeditor/?webmap=1cc837149e4c40c5a326c1495d7aa239
2. Define the Map Extent
To set the initial map extent, use the key extent, then specify the coordinates separated by a comma. The coordinates can be in either a geographic or a projected coordinate system. When using a projected coordinate system, be sure to include the Well Known ID or WKID.
Key-value pair for a Projected Coordinate System: extent=MinX,MinY,MaxX,MaxY,WKID
Key-value pair for a Geographic Coordinate System: extent=MinX,MinY,MaxX,MaxY
- https://organization.example.com/portal/apps/webeditor/?webmap=1cc837149e4c40c&extent=-117.20,34.055,-117.19,34.06
3. Zoom to a Location
To zoom to a specific location upon opening the map, use the key find, followed by an address, city, or country.
Key-value pair: find=redlands
- https://organization.example.com/portal/apps/webeditor/?webmap=1cc837149e4c40c&find=redlands
4. Zoom to a Feature
To zoom to a specific feature in a searchable layer upon opening the map, use the key find followed by an attribute value in the searchable field. Hint: Enable Search By Layer on the web map beforehand.
Key-value pair: find=Prospect Hill
- https://organization.example.com/portal/apps/webeditor/?webmap=1cc837149e4c40c&find=Prospect%20Hill
5. Set the Version for Editing
If you’re editing an enterprise geodatabase with versioning, you can set the default version using the key version and the name of the version you want to use.
Key-value pair: version=versionname
- https://organization.example.com/portal/apps/webeditor/?webmap=1cc837149e4c40c&version=versionname
Best Practices
Encoding Parameters
Encoding makes sure that everything is readable for ArcGIS Online. A general rule is that any spaces in the value(s), need to be replaced with %20 before you paste the URL in the address bar. For example, the address:
- 380 New York Street, Redlands, CA
would look like this after its encoded:
- 380%20new%20york%20street,%20redlands,%20ca
To keep things easy to read, many examples you find on the web are not encoded. But don’t worry, you don’t need to encode parameters yourself. There are numerous free websites you can use online for generating encoded URLs.
Summary
In this article, we unpacked URL parameters from the ground up. We covered some basics including key-value pairs, web map URLs, and mixing and matching parameters. We outlined specific parameters you can use with ArcGIS Enterprise to tailor Web Editor applications for your projects. We hope you’ll leverage this powerful technology to enhance your online data editing experience.
Support for URL parameters in ArcGIS Online Web Editor applications will be coming in a future update (except for the key version, which is specific to Enterprise). Stay tuned for future updates, and check out these links for more resources:
- Use URL Parameters in ArcGIS Web Editor (Help)
- Use URL parameters in Map Viewer (Blog)
- Use URL parameters in ArcGIS Instant Apps (Blog)
Commenting is not enabled for this article.