diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2017-11-10 11:32:37 -0500 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-11-17 10:05:15 -0800 |
commit | 22c07596a0c1e2cca12df730be4448bbe79be13d (patch) | |
tree | 6f50cda446e03660c6e34aae4122177cffd73fe9 /platform/node/test/suite_implementation.js | |
parent | 5bdee52e5c441e6daaae7cf9f320257d0ea3d031 (diff) | |
download | qtlocation-mapboxgl-22c07596a0c1e2cca12df730be4448bbe79be13d.tar.gz |
[core] Split MapMode::Still into Static and Tile
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
Diffstat (limited to 'platform/node/test/suite_implementation.js')
-rw-r--r-- | platform/node/test/suite_implementation.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/platform/node/test/suite_implementation.js b/platform/node/test/suite_implementation.js index c5987538d0..b0be2fa0eb 100644 --- a/platform/node/test/suite_implementation.js +++ b/platform/node/test/suite_implementation.js @@ -14,21 +14,25 @@ mbgl.on('message', function(msg) { var maps = new Map(); module.exports = function (style, options, callback) { + var tileMode = options.mapMode === 'tile'; if (options.recycleMap) { - if (maps.has(options.pixelRatio)) { - var map = maps.get(options.pixelRatio); + var key = options.pixelRatio + '/' + tileMode; + if (maps.has(key)) { + var map = maps.get(key); map.request = mapRequest; } else { - maps.set(options.pixelRatio, new mbgl.Map({ + maps.set(key, new mbgl.Map({ ratio: options.pixelRatio, - request: mapRequest + request: mapRequest, + mode: options.mapMode })); - var map = maps.get(options.pixelRatio); + var map = maps.get(key); } } else { var map = new mbgl.Map({ ratio: options.pixelRatio, - request: mapRequest + request: mapRequest, + mode: options.mapMode }); } |