Open defiantgoat opened 7 years ago
The tile package tool uses the x-callback-url specification (http://x-callback-url.com/specifications/).
The parameters listed below are based on using the current Portal object and the parameters it provides.
Research suggests that a maximum character length of 2000 for a url is still advisable.
arcgis-tilepackage://x-callback-url/[action]?[action parameters]&[x-callback parameters]
Note: the parameters are URL encoded
x-callback-url protocol is defined in http://x-callback-url.com/
Create a new tile package
Request Parameters
refreshToken [optional]
current refresh token if available
Portal.refreshToken
handoffClientId [required if refreshToken sent]
application clientId
Portal.clientId
tileService [optional]
unique id of the tile service if known
center [optional] lat and long in decimal coordinates for map center center=12.434343,33.00909
zoomLevel [optional]
Desired zoom level to display the export map at on startup. This is just for convenience for the user and doesn't restrict changing once in the Tile Package Tool.
saveToPath [optional]
Path to desired location to save TPK to locally. Note: If user decided to upload tpk to AGOL portal then local file will be deleted after upload. Should be encoded
Return Parameters
isShared [Boolean] true || false : If the tile package was shared with the organization or public
isOnline [Boolean] true = tile package was uploaded to arcgis online false = tile package was saved local
itemId [Returned if isOnline=true] AGOL id
localPath [Returned if isOnline=false] path to local file
===
Upload a local tile package to online
Request Parameters
refreshToken [optional]
current refresh token if available
Portal.refreshToken
handoffClientId [required if refreshToken sent]
application clientId
Portal.clientId
filePath [optional] Encoded filepath to the .tpk file that should be uploaded online.
Return Parameters
isShared [Boolean] true || false : If the tile package was shared with the organization or public
itemId AGOL id
This is optional but recommended for better user experience
x-source: Name of application calling Tile Package Tool (e.g. Survey123) This is the same as callbackprompt used in current Esri url schemes
x-success : URL to open on completion task. This is analogous to callback parameter used in current Esri url schemes
x-cancel : URL to open if the requested action is cancelled by the user.
x-error : URL to open if the requested action generates an error or failed to complete.
arcgis-tilepackage://x-callback-url/create?token=4-cvk290NVFk2f9ozqgYQidFz5NPZXe-ZMrqI1nqlxTifWhPR6IhkqSXdvZPC2G8_4R9wyHxTX1u6TmN5L_FgAx_LyAUrMxXJHolIEaeLDZfUmURBMrTEO1Xn9a9TLOUb6FMrwfwpHGhRWFA7xMAZcGLxmTJyi_Pqa84fd_hPxKqQ2meD4ApAfSCCp52GWC4ODn8ihwzNJh-nbAzZY9SHw..&username=bilbo_baggins&canpublish=true¢er=13.298383,-89.383838&savelocal=false&tileservice=Dark%20Gray&x-source=Survey123&x-success=arcgis-survey123://
Currently implemented, but needs further testing and refinement.