Please refer to the WATERS Code Playground for examples of library usage.
An example call to the Name Service is below.
The parameters in this object are specific to each service. Please refer to the corresponding WATERS Service page for additional information about input parameters on a per service basis.
|async||Boolean||Default = true. If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. This parameter is only available for AJAX style requests.|
|beforeSend||String||A string representing the name of a pre-callback function that can modify the XMLHttpRequest object before it is sent. Use this to set custom headers etc. The XMLHttpRequest is passed as the only argument. You may return false in function to cancel the request.|
|cache||Boolean||Default = false. If set to false it will force the pages that you request to not be cached by the browser.|
|complete||String||A string representing the name of function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of success of the request.|
|contentType||String||Default = "application/x-www-form-urlencoded". For sending data to the server, use this content-type.|
|dataFilter||String||A string representing the name of function to be used to handle the raw responsed data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function gets passed two arguments: The raw data returned from the server, and the 'dataType' parameter.|
|dataType||String||Default = "JSON". Type of data that you're expecting back from the server.|
|error||String||True||A string representing the name of function to be called if the request fails. The function is passed three arguments: The XMLHttpRequest object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "notmodified" and "parsererror".|
|featureID||Number||For results containing numerous iterable geometry objects, each object will be assigned a feature id beginning with the value of this parameter or 1 if the parameter is not specified.|
|geomCS||String||By default all geometry output from WATERS services utilize the NAD83 geodetic coordinate system. Use this parameter to specify if a different coordinate system for output geometries is desired. All server side transformations are highly dependent on Oracle Spatial settings, particularly as regards those coordinate systems which are not part of Oracle Spatial by default. Use the format "SRID=4326" to specify that the server utilize spatial reference id 4326 (WGS84) to transform outgoing geometries. If the exact Oracle Spatial SRID is unknown, use the format "EPSG:4326" to utilize the OGP Surveying & Positioning Committee code for WGS84 instead.|
|geomFormat||String||For data structures containing geometries, the output format of the geometries defaults to best match the format of the data structure. For example, requesting the JSON data structure format produces by default GEOJSON formatted geometries. Use this parameter to override defaults and force custom output geometry format. See the HTTP service geometry format section for more information on available formats.|
|geomStyleURL||String||Keyword utilized by services when creating output data structures for stylization of geometries. The optStyleURL parameter is used as a prefix to the geometry field name in the output object.|
|geomVerticeLimit||Number||Depending on the parameters used, WATERS services may return results that are too large to reasonably transfer via a HTTP service. In most cases the attribute information associated with output results are only a small portion of the total payload. By far the geometry is the largest data structure being passed to the client. Restricting results to those having a total count of vertices less than this parameter is an effective way to avoid service timeouts. While the service endpoint may cap total vertices returned at a certain number, the client has the option to use this parameter to further restrict output results. This parameter cannot be used to loosen those vertice restrictions imposed by the service endpoint.|
|global||Boolean||Whether to trigger global AJAX event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.|
|OSTolerance||Number||Geometry functions and transformations within Oracle Spatial utilize the concept of tolerance extensively. Tolerance values indicate the minimum distance by which two points are considered distinct when manipulating geometries. See Oracle Spatial Documentation for more information. The default tolerance value for WATERS geometries stored using the NAD83 coordinate system is 0.001 meters. Raising or lowering this value will affect performance with larger values producing speedier but less accurate results.|
|outFormat||String||While the majority of WATERS HTTP services produce JSON and/or JSONP formatted output, some services are also available as SLD. Use this parameter corresponds to the optOutFormat HTTP Parameter.|
|prettyPrint||Number||Optional feature to attempt to format output with logical indentations and linefeeds to promote visualization and debugging efforts. Numeric value indicates the number of three-space indentations to begin pretty printing efforts at. Value of 0 begins at the left margin. Do not pass any value for compacted results. Pretty printed results should never be used in production usage.|
|proxyurl||String||URL to custom proxy server to use for AJAX style request. This parameter is REQUIRED when using the library in AJAX mode.|
|submissionID||String||Identifier submitted with a service request representing a unique or meaningful name for the request. This value will be reflected in return results allowing control over multiple asynchronous service calls. In KML-formatted requests the upper-most folder in the results will be named with this value.|
|success||String||True||A string representing the name of function to be called if the request succeeds. The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status.|
|timeout||Number||Set a local timeout (in milliseconds) for the request.|
|type||String||Default = GET. The type of request to make ("POST" or "GET"). Note #1: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. Note #1: AJAST style requests only support GET.|
Anonymous Surrogate Object
|output||Object||The result from a particular WATERS Service. Please refer to the individual WATERS Service pages for for information about specific output return values.|
|status||Object||See Status Object.|
|submission_id||String||Identifier passed into the service via the options submissionID parameter.|
|status_code||Number||Code indicating that the service returned an erroneous condition. A value of zero indicates success.|
|status_message||String||Message explaining any errors indicated by the error code.|
|execution_time||Number||Amount of time the internal service took to complete. This does not include transmittal time between client and service.|
|output_bytes||Number||Size in bytes of information contained in the output object of the Anonymous Surrogate Object.|
The library contains a top level namespace ("WATERS") to avoid variable name clashes within consumers applications and other libraries.
- New HUC12 to ZCTA5 and ZCTA5 to HUC12 functions added to the library. Since these were new functions, the library version was not incremented.