Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Introduction

Nearmap provides access to its vertical imagery via a subset of the Tile Map Service (TMS) protocol. TMS splits a map into a pyramid of 256x256-pixel map tiles at multiple zoom levels. An application typically downloads a collection of adjacent tiles to cover a given region.

Only the Web Mercator projection is supported by Nearmap’s TMS (EPSG:3857; also known as EPSG:3785 and EPSG:900913). Nearmap’s Web Map Service (WMS) is recommended for other projections.

Available APIs

Nearmap Tiles APIs are used to retrieve tiles. There are two APIs you can use for this purpose:

In addition, there are three Coverage APIs that are used in conjunction with the Tile APIs:

Authentication

Access to Nearmap imagery is only available to authenticated subscribers. Tiles may be requested from Nearmap servers with an API Key. Please refer to the API Key Authentication guide for details on how to obtain and use an API Key.

URL Requests

Nearmap's Tile API is designed to be accessed by an application in an automated fashion via URL requests. We recommend that you use a mapping framework designed to consume tiled maps, such as Google Maps JavaScript API,  OpenLayers,  Leaflet, etc.

Security

The Tile API v3 and Coverage API are only available on HTTPS.

Retrieve Tiles

This API retrieves vertical or panorama tiles for a specified location . 

Format

https://api.nearmap.com/tiles/v3/{CONTENTTYPE}/{X}/{Y}/{Z}.jpg

Parameters

RequiredNameTypeDescription

contentType string

The content type for the requested tiles. The available values are:

  • Vert - for vertical imagery
  • North - for North panorama imagery
  • South - for South panorama imagery
  • East - for East panorama imagery
  • West - for West panorama imagery

zintegerThe zoom level. The highest resolution is typically 21. Uses the Google XYZ scheme.

xintegerThe X tile coordinate (column). Uses the Google XYZ scheme.

yintegerThe Y tile coordinate (row). Uses the Google XYZ scheme.

formatstringThe format of the tile output. The available values are : png, jpg, img .

tertiarystring

The tertiary map to return when Nearmap tile is not found. The available values are: none, Default, Google, Here.

The default value is none.

Note: returned tiles will always be blended with tiles from another survey. Tertiary tiles will only be blended when tertiary parameter is not 'none'.

sincestring

The first day from which to retrieve the tiles (inclusive).

There two possible formats are:

  • For a specific date: YYYYMMDD, e.g. 2015-10-31 to retrieve imagery since this date.
  • For a relative date: xxY, xxM, or xxD, e.g. 5M to retrieve imagery since 5 months ago.

Notes:

  • If specified, and imagery at that location at that date exists, the request returns the imagery.
  • If specified, and imagery at that location at that date does not exist, the request returns imagery of the closest previous date.
  • If not specified, the request returns the latest imagery.

untilstring

The last day from which to retrieve the tiles (inclusive).

There two possible formats are:

  • For a specific date: YYYYMMDD, e.g. 2015-10-31 to retrieve imagery until this date.
  • For a relative date: xxY, xxM, or xxD, e.g. 5M to retrieve imagery until 5 months ago.

Notes:

  • If specified, and imagery at that location at that date exists, the request returns the imagery.
  • If specified, and imagery at that location at that date does not exist, the request returns imagery of the closest previous date.
  • If not specified, the request returns the latest imagery.


apikeystringYour API key. See API Key Authentication for more information.

Example

The following example shows a typical URL request:

https://nearmap/api/tiles/v3/Vert/17/115995/79117.png?tertiary=none&apikey=YOUR_API_KEY

Responses

The possible responses to the URL request are:

CodeDescription
200OK. Tile image in JPEG or PNG format
400

Bad Request. Return when request is invalid.

401

Unauthorized. Return when API key is invalid.

403Forbidden. Return when try to access not allowed area.
404Not Found. Return when cannot find any tiles for the requested condition.
429Too Many Requests. Return when rate limit is reached.
5XXServer Error. Return when something wrong in the server side.

Retrieve Tiles of a Specified Survey

This API retrieves vertical or panorama tiles of a specified survey for a specified location.

Format

https://api.nearmap.com/tiles/v3/surveys/{surveyid}/{contentType}/{z}/{x}/{y}.{format}

Parameters

RequiredNameTypeDescription

surveyidstring

The survey ID in the format of UUID. Only tiles of the specified survey will be returned.

contentTypestring

The content type for the requested tiles. The available values are:

  • Vert - for vertical imagery
  • North - for North panorama imagery
  • South - for South panorama imagery
  • East - for East panorama imagery
  • West - for West panorama imagery

zintegerThe zoom level. The highest resolution is typically 21. Uses the Google XYZ scheme.

xintegerThe X tile coordinate (column). Uses the Google XYZ scheme.

yintegerThe Y tile coordinate (row). Uses the Google XYZ scheme.

formatstringThe format of the tile output. The available values are : png, jpg, img.

apikeystringYour API key. See API Key Authentication for more information.

Example

The following example shows a typical URL request:

https://nearmap/api/tiles/v3/surveys/7b3e120a-7945-11e8-9e77-b119b97a8973/Vert/17/115995/79117.png?apikey=YOUR_API_KEY

Responses

The possible responses to the URL request are the same as the previous API.

  • No labels