Skip to content

How to Use Vector Tiles

Accessing LINZ Vector Tiles

API Endpoints

API Endpoints

LINZ vector tiles are available through: https://basemaps.linz.govt.nz/v1/styles/{tileset_name}.json?api=YOUR_API_KEY

Individual tiles can be accessed through: https://basemaps.linz.govt.nz/v1/tiles/{tileset_name}/{crs}/{z}/{x}/{y}.pbf?api=YOUR_API_KEY

Supported coordinate systems:

  • 3857 (Web Mercator) - Recommended for web applications
  • 2193 (NZTM2000) - Best for New Zealand-specific applications

QGIS

QGIS 3.14+ has native support for vector tiles, making it straightforward to add and use them.

Adding LINZ Vector Tiles to QGIS

  1. Via Data Source Manager

    • Open Data Source Manager (Ctrl+L)
    • Select "Vector Tiles" tab
    • Click "New Generic Connection"
    • Fill in:
      • Name: "LINZ Topographic"
      • URL: https://basemaps.linz.govt.nz/v1/styles/topographic-v2.json?api=YOUR_API_KEY
  2. Via Browser Panel

    • Right-click "Vector Tiles" in the Browser Panel
    • Select "New Generic Connection"
    • Enter the same details as above
  3. Add to Map

    • Double-click the connection to add it to your map
    • The vector tiles will appear with default styling

MapLibre GL JS

MapLibre is the recommended library for web applications using vector tiles.

Basic Implementation

<!DOCTYPE html>
<html>
<head>
  <script src='https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.js'></script>
  <link href='https://unpkg.com/maplibre-gl@4.5.0/dist/maplibre-gl.css' rel='stylesheet' />
  <style>
    body { margin: 0; }
    #map { height: 100vh; width: 100vw; }
  </style>
</head>
<body>
  <div id="map"></div>
  <script>
    const map = new maplibregl.Map({
      container: 'map',
      style: 'https://basemaps.linz.govt.nz/v1/styles/topolite-v2.json?api=c01jwykec5weqkbr50vc30xwzgs',
      center: [174.7633, -36.8485],
      zoom: 10
    });
  </script>
</body>
</html>

ESRI Products

Important Note: ESRI products (ArcGIS Pro, ArcGIS Online) currently do not support the vector tile format used by LINZ Basemaps. For ESRI users, you'll need to use LINZ's raster tile services or XYZ/WMTS endpoints instead.