go-spatial / go-mbgl

Go bindings for Mapbox GL Native
15 stars 1 forks source link

Static map and tile server #18

Open ear7h opened 6 years ago

ear7h commented 6 years ago

Tile server

static map server

ARolek commented 6 years ago

Raster Tile Server API (WIP)

/styles/:style-name/tiles/[tilesize]/:z/:x/:y[@2x].[file-extension]

Questions

Default is 512x512 pixels. (512x512 image tiles are offset by 1 zoom level compared to 256x256 tiles from Mapbox Studio Classic styles. For example, 512x512 tiles at zoom level 4 are equivalent to Mapbox Studio Classic styles tiles at zoom level 5.) 256x256 tiles from the endpoint are one quarter of the size of 512x512 tiles. Therefore, they require 4 times as many API requests and accumulate 4 times as many map views to render the same area.

Static map server (WIP)

This API largely follows the Mapbox Static Maps API

/styles/:style-name/static/:lon,:lat,:zoom,[:bearing],[:pitch]/:widthx:height[@2x][.:file-extension]

ARolek commented 6 years ago

Talked with @jj0hns0n and we should support 256 tiles. Should that be the default? Maybe not but a tilesize parameter should be available in some way.