Commit fec7055f authored by Kaitlyn's avatar Kaitlyn
Browse files

Merge branch 'master' of github.com:CartoCosmos/CartoCosmos into testing

parents 2fcd1b29 c448d0ea
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -48,8 +48,6 @@ export default class MapContainer extends Component {
    );

    map.addControl(new L.Control.Scale({ imperial: false }));

    //new newAutocomplete();
  }

  /**
+1 −0
Original line number Diff line number Diff line
import AstroProj from "./AstroProj";
import LayerCollection from "./LayerCollection";
import L from "leaflet";
import "leaflet-fullscreen";
import { MY_JSON_MAPS } from "./layers";
import "proj4leaflet";

+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);