Using URL parameters in pop-ups

URL variables are a handy way to pass information from one web page to another. The ArcGIS Online map viewer takes the ID of the web map to open as a URL parameter, and ArcGIS Online web maps can make use of URL parameters to define things such as the basemap, layers, and extent.

In this example we’ll take a look at how to construct a string to pass information from a pop-up to another website using URL parameters from feature attributes.

The Map

In this example we’re working with a parcel layer in our map. The pop-up for the parcel layer is shown below, note that the field APN contains the unique identifier for each parcel.

The Website

The county assessor’s website delivers detailed information for each parcel via the Property Information Management System (PIMS). The information can be retrieved by searching on the owner name, APN, or map book number. Below we’ve gotten the results for one of the parcels by entering the owner’s name.

Taking a closer look at the URL we can see that the unique identifier (the APN) for each parcel is included as a parameter in the URL, appearing at the end after ?parcel=

The Mission

We’d like to access the PIMS website from the parcel pop-up, retrieving the specific information for the parcel that was clicked. Currently there is no direct link in our pop-up to access the assessor’s PIMS website, but we do have the unique parcel identifier (in the APN field) for each parcel.

At the PIMS website we’ve learned that the URL takes the unique identifier (APN) as a parameter to retrieve information for any given parcel.

Our challenge is to construct a link that passes the contents of the APN field as a URL parameter to the PIMS website, so we can open the parcel’s information from the feature pop-up.

Connecting the dots

One way to accomplish this is to construct a custom link for our parcel pop-up (in the layers shown below named Map Book). First choose Configure Pop-up:

Then from the drop-down options under pop-up Contents, choose A custom attribute display:

Using this option you can use a combination of rich text, attributes, and links to create a custom information pop-up. For example, below we’ve combined a string with an attribute. Attributes appear in curly braces, and will display the specific data from that attribute for each feature.

Here’s our custom attribute display:

And here’s what the pop-up looks like.

Our next task is to configure a custom link that will add the APN to the URL to open the PIMS web page for each parcel. In Configure Attribute Display, we added the string “View PIMS info,” selected it, then clicked Create Link:

In Link Properties, we copied and pasted the URL from the PIMS site, including ?parcel=, then added the field {APN} at the end. We noticed there were four extra trailing zeros that we also needed to include after the APN. Shown below is the end of the URL, with the field {APN} passed as a parameter plus the trailing zeros:

The pop-up now looks like this, with the View PIMS info hyperlink:

When clicked, the hyperlink opens the PIMS page for the parcel – mission accomplished!

For more information see About displaying attributes with pop-up windows and Configuring pop-up windows.

This entry was posted in ArcGIS Online and tagged , . Bookmark the permalink.

Leave a Reply


  1. berniejconnors says:


    This is a great feature. I have just setup a similar web map for the parcel maps in my jursidiction with a link into our online land registry. However – what would make this map really useful is the ability to search for a parcel using the parcel ID number. Is ESRI working on a new feature for that would allow users to setup custom search fields? Currently we can display attributes in a pop-up but we cannot search our attributes.


    • Bern Szukalski says:

      Bernie – thanks for the comments. Yes, attribute display, queries, and query definitions on layers are in-progress, and should be available in the November update for ArcGIS Online.

      • berniejconnors says:

        Great! Thanks for the speedy reply.

      • berniejconnors says:

        Hey Bernie S, what is the update on “attribute display, queries, and query definitions on layers”?

        • Bern Szukalski says:

          berniejconnors – next week’s ArcGIS Online update will add new capabilities which address these. From the development version of the Help (subject to change):
          • Apply filtered views of feature layers—Map authors can now create filters for presenting focused view of feature data in your web map. You can answer simple questions such as, “What is in this dataset and what information applies to my work?” To the person viewing a filtered web map, the filter appears as just another layer in the map. For example, you might create a filter on crime data to only show arsons and petty thefts. You can also provide prompts and hints about the attributes in the layer as a way to guide your audience towards the information they are likely to be interested in.

          • Show tables—Anybody viewing a map in the map viewer can display an interactive table of the attribute information in the web map. Tables can be a useful way to quickly view the data in a feature layer of a map.

          More information will be available in the help once released, and we’ll cover these topic in more detail in future blog posts.

  2. Brett Lord-Castillo says:

    Maybe I am overlooking something obvious, but what if I have the entire url as an attribute?
    How do I make a link in a custom attribute display that uses the contents of that attribute for its url? I always get a message that the value entered is not valid.

    • Bern Szukalski says:

      Brett – I believe we’ve covered this in our email correspondences – for comment viewers the answer here is that this is not currently supported, but will be a future enhancement.

  3. ryan_a says:

    Is there any way to extract a substring of the field value result? In my instance I have a PLSS file that only has the Section-Township-Range as a single combined attribute with a dash separating (36-12-07). I need the Section Township Range without the dash to create a link to a pdf for the section(361207).

  4. maestro_red1 says:

    Hello guys! can this feature be used as an advertisement tool? say someone is browsing my map and sees a restaurant, then clicks on the POI and this pop up comes out already linked to the restaurant’s url?? if not, is there another ArcGIS online you can recommend for this kind of marketing concept? Regards, -Julio

  5. steinj14 says:

    How do you do this if you’re defining the web map via code and not using an ArcGIS Online web map? The only options I see for popup configuration is field, image, and chart. I need to create a link where I can pass in field values just like you did here.

  6. carrie.mack says:

    I have the same question Brett did:
    “Maybe I am overlooking something obvious, but what if I have the entire url as an attribute?
    How do I make a link in a custom attribute display that uses the contents of that attribute for its url? I always get a message that the value entered is not valid.”
    I have an ArcOnline map of city and watershed district boundaries, and I would like to send the map user to the website of the appropriate jurisdiction, but can’t find a way to make an attribute ( for example) to be a hyperlink. I’ve used the customize pop up window and used the hyperlink function/button to indicate that the URL be the field {website}, but it navigates to a nonexistent url that starts with\……and ends with my specification (\ to use the above example).

    • Bern Szukalski says:

      Using custom configurations you can have any text be a link. The blog post uses a concatenation technique to add the value from one field (APN in the blog case) to a URL string, passing the APN as a parameter.

      You can use any link you have in your attributes, though a better way to present that might be in a pop-up which lists attribute contents (the default) rather than a custom pop-up configuration. I can’t tell for sure what you are attempting to do, but if your map is public I can take a look. Send the link to your map to

  7. johnenglish80 says:


    Is it possible to get feature geometries with this type of expression such as:{!shape.centroid.y@decimaldegrees!}&lon={!shape.centroid.x@decimaldegrees!}&v=p&o=n&type=ob&level=n

    Thanks, John

  8. cd65023 says:

    My URL parameters were working great up until the new updates hit last week 07/03/2014. When I click on the link, extra characters are added automatically like, “” and it is causing the link to not work. Any ideas?

  9. cd65023 says:

    span class=’esriNumericValue’

  10. ryanslakman says:

    Can you do this to create an email hyperlink? So if my field is {email}, what would i do to have it open outlook and send an email when they click on the link? I tried the html below but it didn’t work:


    • ryanslakman says:

      hmm, my html code didn’t go through on the post

    • Bern Szukalski says:

      I’ve found two ways to implement an email link in a pop-up. One is to use the email itself – e.g. – via a link you create in a custom attribute display, and the other is by adding a graphic (perhaps the person’s photo, or a generic email graphic) and then using the mailto: link as the link that opens when you click the graphic. Will publish a blog post on this, probably later today.

  11. mikehornes says:

    This is a great start. My problem is, I have 18,000 parcels. It isn’t feasible to manually input all this information. I am trying to do the same thing, in order to get this data out to our code enforcement staff. I have created a field in my attribute table for the appraisal districts url. I created a spreadsheet with the ownership data, which includes the Account number.

    Here is an example. I have an account number, say: R0001234 (this is made up). The appraisal districts url for this would be: Every accounts url is exactly the same, and the only part that changes is the account number. So, what I did was separate out the url into fields and then concatenate them to include each unique account. So now, I have an attribute table with all the correct url’s in my shapefile.

    My question is, how can I use that attribute field, which is a url, as a hyperlink in my popup? Without entering in each url for each parcel.


    Michael Hornes
    City of Palestine, Texas GIS Analyst

  12. clewis says:

    This is a great post and gives more info than the Configuring pop-up windos Help topic. I setup an attribute which does have the full url string. My question is can you specify a target parameter as done in a href tag like this -a href=”{Hyperlink}” target=”_self”>Click Here for more info‘ ?
    We are trying to switch our Google Map over to ArcGIS Online and users don’t want a new browser window or tab to open when they click on more info in the pop-up.