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 ?

up vote 4 down vote accepted

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

  • Great! Thank you for your reply. – flp Aug 29 '15 at 23:05

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.