Intro

Tiles are images of specific plots of land that are stitched together by mapping libraries, such as OpenLayers, in order to render a full map for the user. Similar to how there are different providers for mapping libraries, there are different providers for tiles. We recommend using MapWrapper with Mapbox GL JS and our vector tiles.

If you use MapWrapper, the usage of these endpoints is handled automatically.

Tile

GET/geo/tiles/:zoom/:x/:y

Upon validation of the API key, one credit is deducted for the start of a tile session. A tile session includes the tiles requested by an individual client within a 15-second period.

Parameters

:zoominteger (0-20)(required)
:xinteger(required)
:yinteger(required)
typestring(optional)
default value: "raster" *
Options:
  • "raster"
  • "vector"
Note: When type=raster a pre-rendered PNG is returned. When type=vector a PBF file is returned and can be used to render vector tiles on the client side with a JavaScript mapping library like Mapbox GL JS.
* We recommend using vector tiles for rapid performance and more viewing options. At some point we plan to change the default value to "vector" and eventually deprecate support for raster tiles.

Example: Request for raster tile

Request

curl "https://api.nettoolkit.com/v1/geo/tiles/12/1171/1566?type=raster" \
-H "X-NTK-KEY: $YOUR_KEY_HERE"

Response


© OpenStreetMapcontributors

Vector tile style

GET/geo/tiles/style/bright/style.json
NetToolKit vector tile style document, based on OSM Bright style.
Format: JSON (Mapbox style document)

A style document can be used to customize the appearance of vector tiles. This style is used by default in MapWrapper when the provider is set to Mapbox GL JS but can also be used in other mapping libraries that support vector tiles. To use NetToolKit vector tiles with another style specify our tile endpoint in that style document.