({ lat, lng }, zoom)
| 193 | } |
| 194 | |
| 195 | export function latLng2Tile({ lat, lng }, zoom) { |
| 196 | const worldCoords = latLng2World({ lat, lng }); |
| 197 | const scale = Math.pow(2, zoom); |
| 198 | |
| 199 | return { |
| 200 | x: Math.floor(worldCoords.x * scale), |
| 201 | y: Math.floor(worldCoords.y * scale), |
| 202 | }; |
| 203 | } |
| 204 | |
| 205 | export function getTilesIds({ from, to }, zoom) { |
| 206 | const scale = Math.pow(2, zoom); |
nothing calls this directly
no test coverage detected