Skip to content

Commit

Permalink
Export utils properly
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmichaeldiego committed Jul 25, 2020
1 parent ea79cc9 commit c6fe9cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/index.js
@@ -1,3 +1,5 @@
import GoogleMap from './google_map';

export * from './utils';

export default GoogleMap;
8 changes: 4 additions & 4 deletions src/utils/utils.js
Expand Up @@ -8,8 +8,8 @@ function latLng2World({ lat, lng }) {
let y = 0.5 - (0.25 * Math.log((1 + sin) / (1 - sin))) / Math.PI;

y = y < 0 // eslint-disable-line
? 0
: y > 1
? 0
: y > 1
? 1
: y;
return { x, y };
Expand Down Expand Up @@ -90,8 +90,8 @@ function fitNwSe(nw, se, width, height) {
// TODO find center just unproject middle world point
const middle = {
x: nwWorld.x < seWorld.x // eslint-disable-line
? 0.5 * (nwWorld.x + seWorld.x)
: nwWorld.x + seWorld.x - 1 > 0
? 0.5 * (nwWorld.x + seWorld.x)
: nwWorld.x + seWorld.x - 1 > 0
? 0.5 * (nwWorld.x + seWorld.x - 1)
: 0.5 * (1 + nwWorld.x + seWorld.x),
y: 0.5 * (nwWorld.y + seWorld.y),
Expand Down

0 comments on commit c6fe9cb

Please sign in to comment.