Tiles

Tiles API diagram

Executive Summary:
The Tiles endpoint provides vector map tiles (PBF format) for rendering interactive maps (e.g. with MapLibre). You can retrieve individual map tiles by specifying zoom (z), column (x), and row (y) coordinates. Tiles are binary data and must be used with a suitable client.

Use this API to load base map layers or custom map data in your application.

Overview & Use Cases

The Tiles service delivers vector tiles optimized for client-side rendering. Each tile contains geometric map data (roads, buildings, water, etc.) at a specific zoom level and coordinates.

Common use cases include:

  • Rendering interactive maps with MapLibre or Mapbox GL JS
  • Custom map styling with raw vector data
  • Offline map caching (where permitted)
  • Performance-optimized map rendering

Base URL

text
https://api.ambalaymaps.com

Endpoint

  • Method: GET
  • Path: /services/tiles/{z}/{x}/{y}
  • Allowed Service: TILES
  • Billed Service: TILES

Authentication

Tiles can be authenticated using either query parameters or headers.

Query Authentication (Browser Use)

http
GET /services/tiles/14/9312/6940?key={API_KEY} HTTP/1.1
Host: https://api.ambalaymaps.com

Best for:

  • MapLibre / Mapbox browser clients
  • Direct tile URL loading

Tradeoff:

  • API key is visible in URL

Header Authentication (Server Use)

http
GET /services/tiles/14/9312/6940 HTTP/1.1
Host: https://api.ambalaymaps.com
x-ambalay-key: {API_KEY}

Best for:

  • Backend services
  • Secure internal systems

Tradeoff:

  • Not directly usable in browser tile URLs

Recommended Usage

  • Use query authentication for frontend map rendering
  • Use header authentication for backend proxy services

Successful Response

Tiles return binary vector tile data in PBF format:

HTTP/1.1 200 OK
Content-Type: application/vnd.mapbox-vector-tile