mapbox/tilejson-spec

Add extent key

ansis opened this issue · 2 comments

Similar to center it would specify an extent that could be used to to set the default center and zoom. Extent would allow a specified area to always be shown, no matter the map size.

viewport
porthole
windowsize
initialmapview
mapmustshowthis

Going to close this since bounds properly satisfies what an extent key would do. If someone needs the tile XY extents, this can be calculated with libraries like node-sphericalmercator. If this isn’t the case, please reopen!

In the 2.2.0 spec

// OPTIONAL. Default: [-180, -90, 180, 90].
// The maximum extent of available map tiles. Bounds MUST define an area
// covered by all zoom levels. The bounds are represented in WGS:84
// latitude and longitude values, in the order left, bottom, right, top.
// Values may be integers or floating point numbers.
"bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ],