Multiple Definition Queries on the same Data Source in MXD - still the way to go?

2036
2
02-06-2019 03:26 PM
Arne_Gelfert
Occasional Contributor III

Currently in the process of re-publishing a number of map services to ArcGIS Server. Some of these make extensive use of definition queries on multiple instances of the same datasource. In a simple example, a feature class of oil & gas leases may be the source for multiple layers in the MXD, each with have a definition query on expiration date, to symbolize with different color by Q1, Q2, Q3... of a given year. Other scenarios may have dozens of layers using the same data source with a def query.

  • Is it that (still) the best way to do it?

I remember seeing that ArcGIS Pro offers functionality for using multiple definition queries on a layer/data source that can be selected (turned on/off). But I don't think there is a way to publish that out to a service.

How about definition queries at the web level? JSAPI allows overriding feature symbology and offers a def query feature, right? Has anyone looked at how that performs compared to using a definition queries as described above?

0 Kudos
2 Replies
TanuHoque
Esri Regular Contributor

Support for multiple definition queries associated with a layer is only available in Pro (starting 2.3 release). When you have a layer with multi def queries, you can switch between them -- and you will know only one def query or none can be active at any given moment.

But I don't think there is a way to publish that out to a service.

That's correct. When you publish that as a map service, only the active def query (or none) get carried over.

How about definition queries at the web level? JSAPI allows overriding feature symbology and offers a def query feature, right?

yes, that works. Instead of publishing a map service with dozens of layers (off the same source with different def queries), you can publish only one layer and set the def query at the web level. 

As per symbology - not all renderer types and symbols are supported on the web level. Pls check that out first.

Has anyone looked at how that performs compared to using a definition queries as described above?

performance should be on par with what you see in ArcGIS Pro or ArcMap

0 Kudos
Arne_Gelfert
Occasional Contributor III

Great information, Tanu. Thanks for sharing,

0 Kudos