kopia lustrzana https://github.com/robhawkes/vizicities
Request tiles nearer the camera before those further away
rodzic
4e8aceb9c6
commit
9882b8636d
|
@ -10460,6 +10460,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
// Moved to _outputTiles() for now
|
||||
// this._removeTiles();
|
||||
|
||||
// Order tile-list by zoom so nearest tiles are requested first
|
||||
checkList.sort(function (a, b) {
|
||||
return a._quadcode.length < b._quadcode.length;
|
||||
});
|
||||
|
||||
// 5. Filter the tiles remaining in the check list
|
||||
this._tileList = checkList.filter(function (tile, index) {
|
||||
// Skip tile if it's not in the current view frustum
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
// London
|
||||
// var coords = [51.505, -0.09];
|
||||
var coords = [51.505, -0.09];
|
||||
|
||||
// Manhattan
|
||||
var coords = [40.739940, -73.988801];
|
||||
// var coords = [40.739940, -73.988801];
|
||||
|
||||
var world = VIZI.world('world', {
|
||||
skybox: true,
|
||||
|
|
|
@ -157,6 +157,11 @@ class TileLayer extends Layer {
|
|||
// Moved to _outputTiles() for now
|
||||
// this._removeTiles();
|
||||
|
||||
// Order tile-list by zoom so nearest tiles are requested first
|
||||
checkList.sort((a, b) => {
|
||||
return a._quadcode.length < b._quadcode.length;
|
||||
});
|
||||
|
||||
// 5. Filter the tiles remaining in the check list
|
||||
this._tileList = checkList.filter((tile, index) => {
|
||||
// Skip tile if it's not in the current view frustum
|
||||
|
|
Ładowanie…
Reference in New Issue