GetFindNearest_b
This method is available to developers from the Locate.asmx Web Service and returns a list of nearest points for the Layer to the supplied co-ordinates. With this method you may override the default maximum number of results and the distance values.
http://localhost/isharemaps_internal/locate.asmx/GetFindNearest_b?mapsource=Workshop/AllMaps&layerToSearch=Primary%20Schools&x=
Parameters
Â
Name | Requirement | Description |
---|---|---|
mapsource | mandatory | A list can be obtained from the GetMapSources method. This needs to be the name of the .xml file (without the .xml extension) not the name of the MapSource in Studio. |
layerToSearch | mandatory | A list can be obtained from the GetFindNearestSources method. These layer names as the MapServer layer names not the name for the layer in Studio. |
x | mandatory | Easting in British National Grid coordinates for the search to take place from. |
y | mandatory | Northing in British National Grid coordinates for the search to take place from. |
includeMap | mandatory | Either true or false whether a map image byte stream is returned |
maxResults | mandatory | Must be an integer (0 if null). Â If null then default used |
maxDistance | mandatory | Must be an integer (0 if null). Â Specified in metres. Â If null then default used |
width | mandatory | Width in pixels for the map image |
height | mandatory | Height in pixels for the map image |
Â
Returns
An array of Base Layer Definitions. Â Can be zero in length.
Errors
Raises error – Invalid Map Source
Raises error – Invalid Find Nearest Source