You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TileJSON doesn't seem to support Mapbox's own vector tiles spec. Am I misunderstanding something, or is this an omission?
I can see two ways to support it:
The data element should allow URLs that end in .pbf and return PBF files. But then, with the REQUIRED tiles attribute, it would be a bit awkward to conform to the spec for a purely vector source...
The tiles element should allow URLs that end in .pbf and return PBF files.
Either way I guess the scope of the spec is changing, since presumably it was originally envisaged that this was strictly for raster tiles and here it is being used for vector data...
@stevage we have been going with option 2 (specifiying vector.pbf URLs in the tiles key of tilejson). Is there something in the tilejson spec you're seeing that implies that the tiles key should be limited to a particular format?
Ah thanks. No, there's nothing that says explicitly that tiles can only be .png. (There's also nothing that says that other formats are ok, or that the URL should determine the format.)
However, when I tried using .pbf tiles with Mapbox Studio and it didn't work I concluded (wrongly) that using .pbf files wasn't ok. Which is perhaps another way of saying that the spec isn't totally clear.
Also, it does seem that there is an ambiguity if you're serving GeoJSON tiles. A quick reading of the spec would suggest using the data field, but then you'd run into the REQUIRED tiles field.
Another ambiguity is in the "All endpoints MUST return the same content for the same URL" clause. It's not totally clear to me whether having a .pbf and .geojson endpoint would satisfy that clause or not (it would be the same "content", but in two different formats.) I imagine it probably wouldn't. (It's also slightly wrong to say "for the same URL", because by definition different endpoints have different URLs...that confused me a bit at first, thinking it meant that each endpoint just had to be consistent about how it responded to a given request...)
Hey y’all, this could use some improved language in the specification to make it clear where to specify the tile format. We’ll plan on clearing this up in the upcoming v3 specification, with an eye towards the tiles, and data. We'll comment back here when there's something to review!
Activity
yhahn commentedon Mar 16, 2015
@stevage we have been going with option 2 (specifiying
vector.pbfURLs in thetileskey of tilejson). Is there something in the tilejson spec you're seeing that implies that thetileskey should be limited to a particular format?stevage commentedon Mar 16, 2015
Ah thanks. No, there's nothing that says explicitly that
tilescan only be .png. (There's also nothing that says that other formats are ok, or that the URL should determine the format.)However, when I tried using .pbf tiles with Mapbox Studio and it didn't work I concluded (wrongly) that using .pbf files wasn't ok. Which is perhaps another way of saying that the spec isn't totally clear.
stevage commentedon Mar 16, 2015
Also, it does seem that there is an ambiguity if you're serving GeoJSON tiles. A quick reading of the spec would suggest using the
datafield, but then you'd run into the REQUIREDtilesfield.Another ambiguity is in the "All endpoints MUST return the same content for the same URL" clause. It's not totally clear to me whether having a .pbf and .geojson endpoint would satisfy that clause or not (it would be the same "content", but in two different formats.) I imagine it probably wouldn't. (It's also slightly wrong to say "for the same URL", because by definition different endpoints have different URLs...that confused me a bit at first, thinking it meant that each endpoint just had to be consistent about how it responded to a given request...)
rochoa commentedon Nov 27, 2017
What if I want to support both PNG and PBF tiles?
I could use
tilesfor the PNG URLs anddatafor the PBF URLs, however, the spec fordataisAn array of data files in GeoJSON format..mapsam commentedon Apr 3, 2018
Hey y’all, this could use some improved language in the specification to make it clear where to specify the tile format. We’ll plan on clearing this up in the upcoming v3 specification, with an eye towards the tiles, and data. We'll comment back here when there's something to review!