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 27 Current »


This API is now deprecated. We are continuing to support this API for existing integrations, however new integrations should be using the new Tile API, in conjunction with the Coverage API.

At a future time this API will become unavailable. We will communicate the plan for removing the API with customers soon, with a substantial notice period.

This guide includes the following sections:


Introduction

Nearmap provides access to its Vertical and Panorama Imagery via a Tile API (TMS) protocol. The Tile protocol 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.

Panorama Imagery

Nearmap Panorama imagery is an orthorectified mosaic of 45 degree imagery from each cardinal direction (North, South, East, West), intended for visualisation use only.

The intended use of the Panorama TMS API is integration of Panorama imagery in a third-party web application, also for visualisation only.

Because it is created by combining many images, metadata that is normally associated with oblique imagery (such as pose and calibration), is not available. All the metadata available for panorama imagery is described under Getting a List of Surveys by Date for a Location.

Availability

The Panorama imagery is only available to customers with a Nearmap Panorama or Nearmap Oblique product.

Integration of Panorama tiles into a mapping application is complex. You will need to have significant experience with coordinate system geometry and map projections, and experience developing non-trivial mapping applications with a mapping framework such as OpenLayers or Leaflet.

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.

Data Types Available through the API

Nearmap Tile API consists of a couple of individual HTTP APIs, which are used in conjunction:

  • Info API -  for retrieving imagery dates
  • TMS API -  for retrieving vertical and panorama tiles

URL Requests

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 APIOpenLayersLeaflet, etc. 

TMS API URL Format

Nearmap imagery (tiles) may be requested by URLs in the following formats:

  • http://[RC][NUMBER].nearmap.com/maps?parameters
  • https://[RC][NUMBER].nearmap.com/maps?parameters

Parameters

RequiredNameTypeDescription

RCstringThe region code. For example, au or us. Note: the region code for New Zealand is also au.

NUMBERinteger

The domain rotation number. Valid numbers are 0-3.

Domain rotation is used to drive traffic from multiple domains to a single IP address. 

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

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

zinteger

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

Read about the zoom levels.

nmlstring

The orientation of the imagery:

Vertical Imagery:

  • For vertical imagery, set: nml=V

Panorama Imagery:

  • For North panorama imagery, set: nml=N
  • For East panorama imagery, set: nml=E
  • For South panorama imagery, set: nml=S
  • For West panorama imagery, set: nml=W

nmdinteger

The date in the format YYYYMMDD. For example, 20151031.

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.

See Getting a List of Surveys by Date for a Location for instructions on retrieving options for setting this parameter.

excludestringMust be set to background. Used to exclude tertiary satellite imagery when Nearmap imagery is not available.

versionintegerThe version number. Must be set to 2.

httpauthBooleanIndicates whether the tile server should prompt for HTTP basic authentication. Set this to false (we no longer support HTTP basic authentication).

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

Examples

The following examples show two typical URL requests, one over http, and the other over https:

http://au0.nearmap.com/maps?x=115995&y=79117&z=17&nml=v&version=2&httpauth=false&apikey=ZjNhZDkyNDUtZjIyMS00NTkwLWJlMzYtZDJlNWUyNDkxNjE4

https://us1.nearmap.com/maps?x=119799&y=215845&z=19&nml=v&version=2&httpauth=false&apikey=ZjNhZDkyNDUtZjIyMS00NTkwLWJlMzYtZDJlNWUyNDkxNjE4

Getting a List of Surveys by Date for a Location

This section includes how to get a list of surveys by date for a location using the INFO API, and an explanation about the survey lists in the JSON response.

INFO API URL Format

Nearmap surveys may be requested by URLs in the following format:

http://[RC][NUMBER].nearmap.com/maps?ll=LAT,LONG&nmq=INFO&nmf=json&z=18&apikey=YOUR_API_KEY

Parameters

RequiredNameTypeDescription

RCstringThe region code. For example, au or us.

NUMBERinteger, integer

The domain rotation number. Valid numbers are 0-3.

Domain rotation is used to drive traffic from multiple domains to a single IP address. 

llintegerLatitude and longitude of the location on which to centre the image, in the format LAT,LONG. For example, 37.334849,-122.008946.

zintegerThe zoom level. The web mercator zoom is used. This parameter must be set to 18.

nmqstring

The request. The parameter must be set to INFO.

nmfinteger

The response format. The parameter must be set to json.

httpauthBooleanIndicates whether the tile server should prompt for HTTP basic authentication. Set this to false (we no longer support HTTP basic authentication).

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

Survey Lists in JSON Response

The JSON response contains a set of lists of dates for which imagery is available at the given location. The response contains an array for each of the different content types.

Attributes

NameDescription
VertVertical imagery
E__East panorama imagery
N__North panorama imagery
S__South panorama imagery
W__West panorama imagery
within_allowed_areaInternal use only.
coverage_statusInternal use only. Not applicable for requests made with ll=LAT,LON parameter
area_typeInternal use only. Not applicable for requests made with ll=LAT,LON parameter

Example

The following example is a for a US location:

Request

http://us0.nearmap.com/maps/?ll=30.273363957766705,-97.74441599980008&nmq=INFO&nmf=json&z=18&version=2&apikey=ZjNhZDkyNDUtZjIyMS00NTkwLWJlMzYtZDJlNWUyNDkxNjE4

Response

{
	"layers": {

		"E___": [
			"/Date(1493251200000)/"
		],
		"N___": [
			"/Date(1493251200000)/"
		],
		"S___": [
			"/Date(1493251200000)/"
		],
		"Vert": [
			"/Date(1416873600000)/",
			"/Date(1420243200000)/",
			"/Date(1437350400000)/",
			"/Date(1447977600000)/",
			"/Date(1453593600000)/",
			"/Date(1477008000000)/",
			"/Date(1485648000000)/",
			"/Date(1493251200000)/"
		],
		"W___": [
			"/Date(1493251200000)/"
		]
	},
	"within_allowed_area": 1,
	"coverage_status": "full",
	"area_type": null
}

The values are timestamps formatted using  ASP.NET AJAX date format . The numeric value inside the parenthesis is number of milliseconds since epoch  -  January 1 1970 UTC.

  • No labels