Retrieve the Coordinates of a Feature in WGS84 via both LocalInfo and a Virtual Layer in My House

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:

This returns the following results where you can see MapSpurE / MapSpurN give you the OSGB36 coordinates and the MapSpurX / MapSpurY give you the WGS84 coordinates.

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.

This results in the output as seen here which could easily be changed to the URL of a map image.