(targetKey, tiles, maxZoom)
| 185 | } |
| 186 | |
| 187 | export const getKeysToRender = (targetKey, tiles, maxZoom) => { |
| 188 | const ancestor = getAncestorToRender(targetKey, tiles) |
| 189 | |
| 190 | if (ancestor) { |
| 191 | return [ancestor] |
| 192 | } |
| 193 | |
| 194 | const descendants = getDescendantsToRender(targetKey, tiles, maxZoom) |
| 195 | if (descendants.length) { |
| 196 | return descendants |
| 197 | } |
| 198 | |
| 199 | return [targetKey] |
| 200 | } |
| 201 | |
| 202 | export const getAncestorToRender = (targetKey, tiles) => { |
| 203 | let [x, y, z] = keyToTile(targetKey) |
no test coverage detected