1

I am using MapBox and I would like to render my tiles directly from vector format but I was not able to find how to retrieve the tiles in vector format rather than bitmap.

So, when I use this url:

http://api.mapbox.com/v4/mystyle/9/152/191.png?access_token=mytoken

I get a PNG image with my tile 9/152/191 rendered. What I would like is to retrieve this tile in vector format rather than the rendered image, exactly as I can do it with Mapzen for instance:

http://vector.mapzen.com/osm/all/9/152/191.json?api_key=mykey

But when I use .json instead of .png in the MapBox api, it doesn't work and I was not able to find how to do that in their documentation.

Is there any way to retrieve a MapBox tile in vector format ?

Steve Bennett
  • 5,682
  • 2
  • 44
  • 69
flp
  • 200
  • 6

1 Answers1

4

To download vector tiles you need to be requesting a source, not a style, and the extension is .vector.pbf For example you can download a vector tile for mapbox streets at http://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/1/1/1.vector.pbf?access_token=token

Jesse Crocker
  • 1,389
  • 7
  • 13