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:
@@ -1374,6 +1374,9 @@ export const serve_rendered = {
|
|||||||
type: 'baselayer',
|
type: 'baselayer',
|
||||||
};
|
};
|
||||||
const attributionOverride = params.tilejson && params.tilejson.attribution;
|
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 || {});
|
Object.assign(tileJSON, params.tilejson || {});
|
||||||
tileJSON.tiles = params.domains || options.domains;
|
tileJSON.tiles = params.domains || options.domains;
|
||||||
fixTileJSONCenter(tileJSON);
|
fixTileJSONCenter(tileJSON);
|
||||||
|
|||||||
Reference in New Issue
Block a user