The basic methods of the API can be strung together to achieve more complicated result sets, or to perform functions that it may not be immediately apparent can be performed using the Maponics Spatial API. Two such examples are given below.
If we look at the base list of methods, as presented by the API, it can seen that there's no method that allows us to request a list of polygons based on some geographical criteria, such as a radius around an address. In fact, there's no single method that ever returns more than one polygon.
getGeoPolyByAddress, getGeoPolyByID and getGeoPolyByName all return a single polygon's set of coordinates.
However, as detailed in the general method documentation, the Maponics Spatial API will accept multiple requests in a batch mode. This means that you can use one of the geoGeoListBy* methods to return a list of the polygon IDs that satisfy your criteria, and then build a list of getGeoPolyByID methods and send them as a batch request to the API.
This requires two steps inside the client that you write, of course. The first request will be a single method call to one of the geoGeoListBy* methods. This request will return a list of ID numbers. Then you can iterate through that list of ID numbers, and build a batch method call XML request to send to the API and then send those requests en masse.
The Maponics Spatial API's ability to process more than one request at the same time also allows you to request multiple types of information about the same polygon. It can be seen from the method list that no single method allows you to request both the polygonal coordinates of an object and any selection of attributes from that object at the same time. This means, for example, there is no one single method that allows you to retrieve both the coordinates of a Neighborhood and that Neighborhood's name and/or ID.
However, in the example page we've done exactly that. We retrieve the polygonal coordinates of the neighborhood that the address resides in, and at the same time, we retrieve the name and ID of that neighborhood, passing them to Google to be displayed in their GMarker information bubble window.
By examining the sample XML displayed below the Google Mashup, it can be seen that the method by which we accomplished this is to simply send two method calls to the API in the same XML request, one to getGeoAttByAddress for the attributes of the neighborhood and one to getGeoPolyByAddress to retrieve the neighborhood boundary itself.
The API will always return the results of each method call in a multi-method request in the same order in which it recieved the method calls, so when parsing the results, we always know which resultset belongs to which method.