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 5 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.

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 article for details on how to obtain and use an API Key.

TMS URL Request Format

TMS 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.

PhotoMaps imagery (called tiles in this documentation) may be requested by URLs in the following formats:

The following parameters may be specified: 

ParameterValueRequired?
RCRegion code - Examples: au or us.yes
NUMBERDomain rotation number. Valid numbers are 0-3.yes
xX tile coordinate (column)*yes
yY tile coordinate (row)*yes
zZoom level (highest resolution is typically 21) *yes
nmlMust be set to vyes
nmdDate, in the format YYYYMMDD - for example, 20151031.
 
  • 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.
no
versionMust be set to 2yes
httpauthWhether the tile server should prompt for HTTP Basic authentication. Set this to false (as we no longer support HTTP Basic authentication).yes
apikeyYour API Key. See API Key Authentication.yes

 

* tile coordinates use the Google XYZ scheme.

 A typical URL would be: 

http://[RC][NUMBER].nearmap.com/maps?x=1206&y=1539&z=12&nml=v&version=2
&httpauth=false&apikey=YOUR_API_KEY

https://[RC][NUMBER].nearmap.com/maps?x=1206&y=1539&z=12&nml=v&version=2
&httpauth=false&apikey=YOUR_API_KEY

Getting a List of Surveys by Date for a Location



URL Format

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

URL Parameters 

ParameterMeaningExample
RCRegion codeus or au
NUMBERDomain rotation number. Valid numbers are 0-3.0
llLatitude and longitude of the location on which to centre the image in the format LAT,LONG37.334849,-122.008946
zImage zoom (web mercator zoom). Has to be 18.18
nmqMust be set to INFOINFO
nmfMust be set to jsonjson
httpauthWhether the server should prompt for HTTP Basic authentication. Set this to false (as we no longer support HTTP Basic authentication). false
apikeyYour API Key. See API Key Authentication.A325BF1343...

 

Survey date lists in JSON response

The JSON response contains a set of lists of dates for which vertical imagery is available at the given location. The dates are presented in an array with the label "Vert". 

Example for a US location

Request:

http://us0.nearmap.com/maps/?ll=40.729991,-73.844127&z=18&nmq=INFO&version=2
&nmf=json&httpauth=false&apikey=YOUR_API_KEY

Response: 

{	
  "layers": 
    {
      "Vert":[
"/Date(1410739200000)/",
"/Date(1428796800000)/",
"/Date(1441497600000)/",
"/Date(1445817600000)/",
"/Date(1460764800000)/",
"/Date(1476489600000)/"
], }, "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