Automatically adding new map layers to an ArcGIS Server map service

2028
2
Jump to solution
02-10-2016 05:18 AM
TobiasBrühlmeier1
New Contributor III

Hi all,

In my application, I use a map service with about 200 map layers. Users can manually toggle these map layer's visibility in my JavaScript app.

My map service is published to ArcGIS for Server with ArcMap. All layers are added (and symbolised) to ArcMap manually.

Initial data source is a folder containing these 200 MapInfo TAB files. These files are loaded to a File Geo Database with FME, and automatically updated every night. FME also detects new layers and includes them in my F-GDB.

Now I would like to automate this process:

1. New layers should be added to my map service automatically (symbolisation should follow some rules).

2. Deleted layers should be removed from my map services automatically.

What would be a good strategy to solve this? Any hints?

Restriction: I'm not allowed to change anything in my source folder. I have to work with these MapInfo TAB files, I'm not allowed to move them to, let's say, an Enterprise Geo Database.

Best regards Tobias

0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor

Any changes to layers, (adding or removing them), or the properties of a layer, (symbolization, layer definition, etc), within a map document would require that map document to be republished for a service based on that map document to reflect those changes.  You can overwrite the service using Python and arcpy​ and run the script as a scheduled task when there's downtime for your Server.  You can also add those layers and symbolize them in an automated fashion using the arcpy.mapping module.

View solution in original post

2 Replies
JonathanQuinn
Esri Notable Contributor

Any changes to layers, (adding or removing them), or the properties of a layer, (symbolization, layer definition, etc), within a map document would require that map document to be republished for a service based on that map document to reflect those changes.  You can overwrite the service using Python and arcpy​ and run the script as a scheduled task when there's downtime for your Server.  You can also add those layers and symbolize them in an automated fashion using the arcpy.mapping module.

TobiasBrühlmeier1
New Contributor III

Thanks a lot, that helps!

I will try with Python.

Regards, Tobias

0 Kudos