Use center and zoom from style json (#507)
* Use center and zoom from style json as default center for tilejson of rendered maps * Round zoom as style spec allows fractional zooms while tilejson spec does not
This commit is contained in:
parent
ea0bb2ed6b
commit
89c6eb7ddf
1 changed files with 3 additions and 0 deletions
|
@ -1374,6 +1374,9 @@ export const serve_rendered = {
|
|||
type: 'baselayer',
|
||||
};
|
||||
const attributionOverride = params.tilejson && params.tilejson.attribution;
|
||||
if (styleJSON.center && styleJSON.zoom) {
|
||||
tileJSON.center = styleJSON.center.concat(Math.round(styleJSON.zoom));
|
||||
}
|
||||
Object.assign(tileJSON, params.tilejson || {});
|
||||
tileJSON.tiles = params.domains || options.domains;
|
||||
fixTileJSONCenter(tileJSON);
|
||||
|
|
Loading…
Reference in a new issue