Wednesday 11 January 2017

popup - Automating Pop up configuration of web app in ArcGIS for Portal?


I have been tasked to customize several hundred layers (pop up windows) in Portal for ArcGIS (web app). I was wondering if there is a faster way to accomplish this, instead of using the on client pop up config (custom attribute display) for each layer over and over which is repetitive, doing it with code instead? I heard there is a config.json file that has the attributes from the layer schema I have and I can populate these pop ups with code instead?



Answer



If you're using Portal for ArcGIS or ArcGIS Online you can manage your configuration files via the ArcGIS Online Assistant. Login with your Portal or ArcGIS Online credentials and select 'View an Item's JSON' under the 'I Want To...' menu. You can't directly run a batch script from here, but you can copy this JSON code, edit it locally, and then 'upload' the file online by simply copy + pasting your updated JSON text.


Your attribute configuration looks something like this (found under the 'Data' section):


"attributes": {

"FID": 5,
"objectid": 1166889,
"joined": 1,
"planid": 9076621,
"name": "location193",
"type": 8,
"statedarea": "909.08",
"compiled": 1,
"historical": 0,
}

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...