Greetings,
I am using the ArcGIS API for Python and I am struggling with passing parameters to the gis.content.search function.
try:
query_list = ['Boundaries', 'ConservationEasements', 'Geographic Names', 'Hydrography', 'LandCover', 'Mapping Control', 'MontanaMask', 'Montana Managed Areas', 'Montana NAIP', 'NAIP', 'Parcel', 'PLSSS', 'PublicLands', 'Roads', 'Structures', 'Watershed', 'Wetlands']
item_type_list = list()st = 'item_type =' + '"' + 'Feature Layer' + '"'
item_type_list.append(st)
st = 'item_type =' + '"' + 'Imagery Layer'# + '"'
item_type_list.append(st)
st = 'item_type =' + '"' + 'Map Image Layer'# + '"'
item_type_list.append(st)for q in query_list:st = 'query=' + '"' + q + ' AND owner:MontanaStateLibrary' + '"' #+ ', '
temp_list = gis.content.search(st)
Am I missing something obvious?
arcgis-api-python
Solved! Go to Solution.
Did you trip my code changes? Do they work?
Sorry I did try what you suggested after taking a second closer look at what you suggested.
I see what Dan is getting at above, what about:
st = q + ' AND owner:MontanaStateLibrary' temp_list = gis.content.search(query=st)
Success! I am not sure I would have ever figured out to enter an unquoted string. Thanks to both Joshua Bixby and Dan Patterson for the help.
Thanks to you both for the help.
####################
Bob Holliday
Montana State Library
rholliday@mt.gov<mailto:rholliday@mt.gov>