AnsweredAssumed Answered

How to get Map ID (Number?)

Question asked by tpcolson Champion on Jun 25, 2019
Latest reply on Jun 27, 2019 by MBDriscoll

I'm thinking of using https://www.esri.com/arcgis-blog/products/analytics/analytics/updating-your-hosted-feature-services-with-arcgis-pro-and-the-arcgis-api-for-python/ to automate my feature services from one project, instead of a separate project for each service. mp = prj.listMaps()[0] is what tells it to use the first map in the project. 

 

How does one find the Map # in a project with hundreds of maps? Say I want to publish the 30th map in the project. 

 

Python is only outputting

 

prjPath = r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\ARCGIS_SERVER\GRSM_SPECIAL_USE_PERMITS\GRSM_SPECIAL_USE_PERMITS.aprx"
prj = arcpy.mp.ArcGISProject(prjPath)
mp = prj.listMaps()
mp
[<arcpy._mp.Map object at 0x000002560D31BDD8>]
mp = prj.listMaps
mp
<bound method ArcGISProject.listMaps of <arcpy._mp.ArcGISProject object at 0x00000256089FDFD0>>

Outcomes