Unverified Commit 1067f094 authored by Kaitlyn Lee's avatar Kaitlyn Lee Committed by GitHub
Browse files

Merge pull request #100 from jkaufy/master

Fixed Coordinates for polar projections
parents 88184469 979b5d73
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -91,13 +91,7 @@ export default class AstroMath {
    }

    if (convertedLon < 0) {
      if (projection == "EPSG:4326") {
      convertedLon += 360;
      } else {
        convertedLon += 180;
      }
    } else if (projection != "EPSG:4326") {
      convertedLon += 180;
    } 

    return convertedLon;
+12 −0
Original line number Diff line number Diff line
@@ -131,11 +131,23 @@ export default L.Control.MousePositionControl = L.Control.extend({
      if (!this.isLonDom180) {
        lng = this.astroMath.lonTo360(lng, this.map.options.crs.code);
      }
      else {
        if (this.map.options.crs.code != "EPSG:4326")
        {
          if (lng < 0) {
            lng += 180;
          }
          else {
            lng -= 180;
          }
        }
      }

      if (!this.isLonDirEast) {
        lng = this.astroMath.domainToPositiveWest(lng, this.isLonDom180);
      }


      lng = lng.toFixed(this.options.numDigits);
      lat = lat.toFixed(this.options.numDigits);