iShare Maps API / Embedded Maps
The main iShare Maps application is available from My Council. Information provided by the applicaton is also available via the iShare API. This document provides examples of embedded maps & common API requests from the iShare Maps product.
Embedded Maps
There are two types of maps that can be copied & modified to suit your needs. Lite maps provide a simple map with a fixed set of layers displayed. A Solo map has the same interface as the iShare My Maps tab allowing the user to query layers and control their visibility.
-
Mobile Solo Map
This is using the default mapsource and we've requested Primary Schools to be automatically displayed. The side panels can be removed if not required.
-
Mobile Lite Map with Schools
Same mapsource and layer is displayed. In this version of the Lite Map an address search can be displayed.
-
Mobile Lite Map with List of Schools
In this example a Lite Map is combined with a API call that requests the primary schools within your area. When the user hovers over a school name in the list an indicator is placed on the map.
-
Mobile Lite Map centred on user
When a user selects an address in iShare Maps My Council a cookie is generated storing that location. It then can be used for identifying nearby facilities, within boundaries such as conservation areas or in this case centring the map.
Further reading: Cookies used by iShare Maps. -
Mobile Lite Map full screen
This Lite Map that makes full use of the browser's width and height.
-
Mobile Solo Map with a disclaimer
In this last example we've created a Solo Map that has a disclaimer that the user must accept before using the map.
To make use of these you can either copy the resources and javascript contained in these examples or reference the pages directly with iframes as seen below.
API Requests
Address Searches
If the standard LocationSearch service is called passing a search string as the location then it will provide a list of matching addresses. For example to search for 'the cottage': Lookup address via search string or via UPRN.
It's also possible to link to iShare via a URPN: here.
Local Info Requests
The data shown on the My House page can be queried for a given property by passing the name of the panel and the UPRN of the property. This could be the nearest five planning applications, whether the property is in a conservation area or in this example the containing ward.
iShare MapSources
A MapSource is a collection of map layers and associated display settings such a their display name, fields to display when getting feature information etc.
List MapSources
By listing the available mapsources a web developer is able to make futher requests to each mapsource to determine what layers are available through the API. The web developer can then make queries to the API to retrieve information pertinent to a location or create a map to visual the data. An example request to retrive mapsources has been made here.
List contents of an individual MapSource
Here is an example request to the default mapsource. List contents of Mapsource
OGC services (WMS/WFS)
The Open Geospatial Consortium (OGC) are an international standards body who define a number of web standards for querying geospatial data. The two most common are Web Map Service (WMS) and Web Feature Service (WFS). In a mapsource any standard layer is OGC ready and can be queried using WMS or WFS.
WMS
A Web Mapping Service (WMS) provies styled map images and data at a given location. Here is an example WMS Get Capabilities request: here.
WFS
A Web Feature Service (WFS) provides the actual data rather than images. It also has a Get Capabilities request: here.
The capabilities document lists all available layers, their projection, extents etc. The above URLs can be used in desktop GIS tools such as MapInfo Professional and QGIS to easily download and interrogate data.