Skip to content

Instantly share code, notes, and snippets.

@oevans
Last active August 29, 2015 14:09
Show Gist options
  • Save oevans/c03dc2f72bb7c0d1539a to your computer and use it in GitHub Desktop.
Save oevans/c03dc2f72bb7c0d1539a to your computer and use it in GitHub Desktop.

How to migrate web maps using the beta version of the Dark Canvas Basemap to the production services

Download this script and run it twice from a command line as indicated below to migrate both the reference and base layers of the basemap.

python updateWebmapServices.py https://www.arcgis.com [ADMIN-USERNAME] [PASSWORD] [SEARCH-QUERY] http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Dark_Gray_Reference_Beta/MapServer http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Reference/MapServer

python updateWebmapServices.py https://www.arcgis.com [ADMIN-USERNAME] [PASSWORD] [SEARCH-QUERY] http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Dark_Gray_Base_Beta/MapServer http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer

Replace [ADMIN-USERNAME] and [PASSWORD] with the login info of an account in the Administrator role.

Replace [SEARCH-QUERY] to specify items to migrate. Multiple search parameters must be enclosed in quotes. For example:

  • owner:USER123
  • tags:darkbasemap
  • "owner:USER123 tags:darkbasemap"
  • orgid:MXJSDOW23k2kj43

To get your orgID go to My Organization > Find...The most viewed items in the organization > Find orgid tag in URL in the address bar. For example:

http://abc123.maps.arcgis.com/home/search.html?q=orgid:hXUr4F8lE8Jq2u1E&t=content&sortField=numviews&sortOrder=desc&hideq=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment