MCPcopy Index your code
hub / github.com/plotly/plotly.py / latRad

Function latRad

plotly/figure_factory/_hexbin_map.py:39–42  ·  view source on GitHub ↗
(lat)

Source from the content-addressed store, hash-verified

37 ZOOM_MAX = 18
38
39 def latRad(lat):
40 sin = np.sin(lat * np.pi / 180)
41 radX2 = np.log((1 + sin) / (1 - sin)) / 2
42 return max(min(radX2, np.pi), -np.pi) / 2
43
44 def zoom(mapPx, worldPx, fraction):
45 return 0.95 * np.log(mapPx / worldPx / fraction) / np.log(2)

Callers 1

_getBoundsZoomLevelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected