ThemeMapping
Type

Coordinates

Available from


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:

http://isharegis.web/getdata.aspx?requestType=LocalInfo&format=json&group=Education%20and%20Learning&layer=Secondary%20Schools&ms=mapsources/allmaps&x=520667&y=160493&distance=1000

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.

{
   "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.

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