Add XYZ Tiles Layer (TMS) Programmatically

1193
2
Jump to solution
12-04-2022 08:45 AM
Labels (1)
giswqs
by
New Contributor II

ArcGIS Pro supports adding XYZ tile layers (TMS) using the "Add Data From Path" button. Is there a way to add data from URL programmatically without clicking the button? I am developing a plugin that can allow users to add XYZ tile layers programmatically by code in the ArcGIS Notebook. Note that the tile layer URL is generated dynamically. It is inconvenient to click the Add Data From URL button every time. 

giswqs_0-1670171965276.png

giswqs_1-1670172026363.png

 

 

0 Kudos
1 Solution

Accepted Solutions
giswqs
by
New Contributor II

Problem solved. Found the m.addDataFromPath(url) function. 

View solution in original post

0 Kudos
2 Replies
giswqs
by
New Contributor II

Here is what I tried, but it does not work. 

giswqs_0-1670172486241.png

 

0 Kudos
giswqs
by
New Contributor II

Problem solved. Found the m.addDataFromPath(url) function. 

0 Kudos