mapbox / tilejson-spec

JSON format for describing map tilesets.
255 stars 52 forks source link

Add extent key #8

Closed ansis closed 6 years ago

ansis commented 12 years ago

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.

yhahn commented 12 years ago

viewport porthole windowsize initialmapview mapmustshowthis

mapsam commented 6 years ago

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 ],