I am with ArcGIS 10.1 and ArcGIS Online.
I have a MXD file that contains a SDE raster image coming from a SQL Server SDE database. I would like to publish it to ArcGIS Online as Hosted Tile Layer in an automated manner.
I am able to achieve this the manual way by Share As Services ... to My Hosted Services on ArcGIS Online. This is all good.
To achieve automation, I used "
arcpy.mapping.CreateMapSDDraft" to create a sddraft file followed by running "
arcpy.StageService_server(sddraft, sd)" to convert the sddraft tile to a service definition file (sd). Then I used "
arcpy.UploadServiceDefinition_server(sd, 'My Hosted Services')" to upload the sd file to ArcGIS Online.
There was no error shown at all while I ran the script.
When I viewed the Tile Layer (Hosted) on ArcGIS Online, the web map showed nothing. I noticed there was no tiles or no caching in the Tile Layer settings. When running the manual way by Share As in ArcMap, we can set up catching while this seems impossible if we do the arcpy way.
Is there any workaround to solve the problem?