MCPcopy Index your code
hub / github.com/google-map-react/google-map-react / meters2WorldSize

Function meters2WorldSize

src/lib/index.js:64–72  ·  view source on GitHub ↗
(meters, { lat, lng })

Source from the content-addressed store, hash-verified

62}
63
64function 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
74function fitNwSe(nw, se, width, height) {
75 const EPS = 0.000000001;

Callers 1

meters2ScreenPixelsFunction · 0.85

Calls 2

meters2LatLngBoundsFunction · 0.85
latLng2WorldFunction · 0.85

Tested by

no test coverage detected