For project reasons, the first contact with ARCserver needs to be developed using ARCserver. Function: Enter the number of a plot. You must use WMS to return an image of the exterior rectangle of the plot.
My implementation method is to use the transfer method, which means that I create a page and put it on the server. After the client fills in the block number, it will directly submit it to this page; on this page, you can use the ARCserver API to find the corresponding plot, find the coordinates of the external rectangle of the plot, synthesize the WMS service address of the ARCserver, and redirect it to this address.
The problem is how to write this page in the middle? After constant exploration, and constantly accessing the Internet to find information, we finally achieved this function.
The procedure is as follows:
- 1. Specify the user used for the connection.
- 2. Connect to the server.
- 3. Get the SOM object.
- 4. Set the corresponding map name and service type to obtain the context (iservercontext ).
- 5. Obtain imapserverobjects.
- 6. Get the IMAP object through imapserverobjects.
- 7. Obtain the layers and attributes to be queried.
- 8. Set the filter used for query.
- 9. query by calling search
- 10. processing result
The next article will be combinedCodeLet's talk about it (click to view details ).