6

I've noticed when embedding an ArcGIS Online webmap which has a popup with links on it, that there seems to be no way to have the popup link open in the current window. It will always open in a new window.

There are no configuration options for link @targets in the ArcGIS Online popup configuration tool and if you try manually setting the target attribute of a popup link to target="_top" or "_parent" that value will be overwritten as target='_blank' and thus links will open in a new window.

This means you can't really integrate the map with your page, because users are taken outside the original window and you have to figure out a way to get them back in.

I wondered if anyone has a workaround and why ArcGIS Online insists on this behaviour?

2

To do so you need to use ESRI's ArcGIS Online Assistant to edit the JSON that holds the pop-up template. Using the assistant your edits are not checked by ArcGIS Online and so anything is allowed. This also means that it is simple to corrupt map document if you are not careful.

  1. Go to: ESRI's ArcGIS Online Assistant and login to your ESRI account.
  2. From the "I want to..." menu select "View Items JSON"I want to...
  3. From the list on the left side select your map and wait for your maps JSON to load.
  4. When the JSON data loads on the right side navigate past the "Description" data and Edit the "Data" data. "Data" data
  5. Find the line holding the pop-up configuration is question, remove the target="_blank" and save your edits. Edits

These edits will become live when saved however if you reopen the pop-up configuration in the Web Map Viewer in ArcGIS Online and make any edits the target="_blank" will be re-added to the template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.