* _cacheFeatures * @param {Object} cache * @param {Array} features
(cache, features)
| 500 | * @param {Array} features |
| 501 | */ |
| 502 | _cacheFeatures(cache, features) { |
| 503 | const boxes = []; |
| 504 | for (const feature of features) { |
| 505 | cache.features.set(feature.id, feature); // cache feature |
| 506 | |
| 507 | const box = feature.extent.bbox(); |
| 508 | box.data = feature; |
| 509 | cache.boxes.set(feature.id, box); // cache box |
| 510 | boxes.push(box); |
| 511 | } |
| 512 | |
| 513 | cache.rbush.load(boxes); // bulk load |
| 514 | } |
| 515 | |
| 516 | |
| 517 | /** |
no test coverage detected