(meters, { lat, lng })
| 62 | } |
| 63 | |
| 64 | function meters2WorldSize(meters, { lat, lng }) { |
| 65 | const { nw, se } = meters2LatLngBounds(meters, { lat, lng }); |
| 66 | const nwWorld = latLng2World(nw); |
| 67 | const seWorld = latLng2World(se); |
| 68 | const w = Math.abs(seWorld.x - nwWorld.x); |
| 69 | const h = Math.abs(seWorld.y - nwWorld.y); |
| 70 | |
| 71 | return { w, h }; |
| 72 | } |
| 73 | |
| 74 | function fitNwSe(nw, se, width, height) { |
| 75 | const EPS = 0.000000001; |
no test coverage detected