I've published a ArcServer service that is going to be consumed by out of the box, standard ArcGIS on the desktop. My question is, is it possible to write custom tools in VB to query layers from that service in the ArcMap interface. I'm using ArcGIS 9.3. Thanks in advance.
|
Yes, you can. Basically, you have two options to query ArcGIS Server layers in ArcMap via ArcObjects. The first way is to get a reference to an individual AGS sublayer (IMapServerSubLayer). Those layers (i.e. sublayers in this context) which have the Query capability enabled can be cast to IFind interface. You can use this interface to perform simple (and quite limited) querying. The second way means getting access to the actual AGS server object and making use of its search capabilities. First you get a reference to the top-level AGS layer (IMapServerLayer) and use its GetConnectionInfo method to obtain information about the connection. Then you would get access to the server object (map server) and call one of the IMapServer methods, such as QueryFeatureData. This approach is much more involved (see my example code), but the search is not as limited as in the first case.
|
|||||||||
|
|
|
||||
|
|