AnsweredAssumed Answered

AGS 10.1 - Arcpy Mapping WebExport Script

Question asked by shaun_weston-eagle-co-nz-esridist on Oct 3, 2012
Latest reply on Nov 14, 2012 by shaun_weston-eagle-co-nz-esridist
I've created a script similar to what is listed in the documentation here:

t's working well apart from when I have basemaps, so the script will remove out all service layers and leave only the vector layers I have in the MXD:

# Remove the service layer
# This will just leave the vector layers from the template
for lyr in arcpy.mapping.ListLayers(mxd, data_frame=df):
   if lyr.isServiceLayer:
       arcpy.mapping.RemoveLayer(df, lyr)

Which is good apart from a couple of basemaps I have. So the script is removing out the basemap that I have turned on in my web application and I'm not sure what to change in the code to keep that in? Any ideas?