Is it possible to print map layers from multiple map services using ArcGIS Java Script API? I have situation where more than 2 map services needs to be included in a single JavaScript application and layers from any of these services (as selected by the user) needs to be exported as a map using the Export Webmap service (using a defined map template published from my server). However, when using the Export WebMap print service, there is only option to pass one map service as a parameter. Is there any way around?
Thomas,
Maybe I am missing something, but yes the printtask supports printing multiple map services in the map. When you use the print task you specify the url to the print service not the url to a particular webmap or map service.
I have found that if the 'Export Map' operation is not enabled on remote services that I can not print that service's data.
Makes sense
Hi all
I can frame the situation a bit more clearly:
I can print layers from a SINGLE map service by passing that as a parameter to the ExportWebmap task. If I want to print layers from TWO or MORE map services, is it possible to pass these as parameters under url option below?
"operationalLayers" : [
{
"id" : "
}
]
Thanks Thomas
Are you adding the secondary services dynamically or do they already exist in the same map application?
Three services from same ArcGIS server are being used in the map application. The user might turn on any layer(s) from any of the three map services. Nothing is added dynamically
Thomas,
What really has me confused is why you are asking about such low level things like ExportWebmap task and the actual json provided to it. If you use PrintTask and provide the printtask the url to your print service (which is the consumer of the ExportWebmap GP) then you just provide the map object and it does all the work for you.
Rob,
Thanks for this. The reason is, the developer I am working with says there is no option to pass more than one URL (of the map service), and hence my question.
Thomas,
You need to ask the developer if they are using the PrintTask then.