Page Properties | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Overview
The LocalInfo API request is a seldom-used request to fetch information from either single or multiple Layers at a certain Point or Area. One of the unknown features of the request is that it can provide the location points as both OSGB36 (Easting / Northing) and WGS84 (Longitude / Latitude). You may also return WGS38 or OSGB36 coordinates when using a Virtual Layer in My House. In this guide, we will show you how to accomplish both of these request types.
LocalInfo Request Example
LocalInfo Data Requests are requests that can be consumed by other applications, and effectively, you don’t have to do anything extra to return the converted coordinates. See the following request:
...
Paste code macro |
---|
{ "Results":{ "Secondary_Schools":{ "Name":"http://www.roseberyschool.co.uk/|Rosebery School", "street":"White Horse Drive", "town":"Epsom", "postcode":"KT18 7NQ", "Telephone":"01372720439", "MapSpurE":520081.000000, "MapSpurN":160169.000000, "MapSpurMinE":520081.000000, "MapSpurMinN":160169.000000, "MapSpurMaxE":520081.000000, "MapSpurMaxN":160169.000000, "MapSpurX":-0.27790501923466371, "MapSpurY":51.327952021067517 } } } |
My House Request Example
As part of the same code, the same functionality can be used in My House Virtual Layers to also give you the Longitude and Latitude which could be useful if the customer is using the output to generate maps from something other than iShare.
This is accomplished by adding the relevant Virtual Layer tags in the Rows Settings block in Studio as seen in the screenshot below.
...