@@ -1812,7 +1812,7 @@ function identifyInputType(userEntry) {
1812
1812
seconds -= ( decimal * 10000 ) ; //Remove DDD
1813
1813
seconds -= ( minutes * 100 ) ; //Remove MM
1814
1814
convertedCoordinate = decimal + ( minutes / 60.0 ) + ( seconds / 3600.0 ) ;
1815
- if ( convertedCoordinate ) convertedCoordinate *= - 1 ;
1815
+ if ( negativeSign ) convertedCoordinate *= - 1 ;
1816
1816
}
1817
1817
else if ( spaceCount == 0 && dashCount == 0 && ( lengthOfLeadingNumber == 5 || lengthOfLeadingNumber == 4 ) ) //DDMM.mmmmmmm
1818
1818
{
@@ -1824,7 +1824,7 @@ function identifyInputType(userEntry) {
1824
1824
var minutes = userEntry ; //Get DDDMM.mmmmmmm
1825
1825
minutes -= ( decimal * 100 ) ; //Remove DDD
1826
1826
convertedCoordinate = decimal + ( minutes / 60.0 ) ;
1827
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1827
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1828
1828
}
1829
1829
1830
1830
else if ( dashCount == 1 ) //DD-MM.mmmmmmm
@@ -1835,7 +1835,7 @@ function identifyInputType(userEntry) {
1835
1835
var decimal = Number ( data [ 0 ] ) ; //Get DD
1836
1836
var minutes = Number ( data [ 1 ] ) ; //Get MM.mmmmmmm
1837
1837
convertedCoordinate = decimal + ( minutes / 60.0 ) ;
1838
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1838
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1839
1839
}
1840
1840
else if ( dashCount == 2 ) //DD-MM-SS.ssss
1841
1841
{
@@ -1851,13 +1851,13 @@ function identifyInputType(userEntry) {
1851
1851
1852
1852
var seconds = Number ( data [ 2 ] ) ; //Get SS.ssssss
1853
1853
convertedCoordinate = decimal + ( minutes / 60.0 ) + ( seconds / 3600.0 ) ;
1854
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1854
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1855
1855
}
1856
1856
else if ( spaceCount == 0 ) //DD.ddddddddd
1857
1857
{
1858
1858
coordinateInputType = CoordinateTypes . COORDINATE_INPUT_TYPE_DD ;
1859
1859
convertedCoordinate = userEntry ;
1860
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1860
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1861
1861
}
1862
1862
else if ( spaceCount == 1 ) //DD MM.mmmmmmm
1863
1863
{
@@ -1867,7 +1867,7 @@ function identifyInputType(userEntry) {
1867
1867
var decimal = Number ( data [ 0 ] ) ; //Get DD
1868
1868
var minutes = Number ( data [ 1 ] ) ; //Get MM.mmmmmmm
1869
1869
convertedCoordinate = decimal + ( minutes / 60.0 ) ;
1870
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1870
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1871
1871
}
1872
1872
else if ( spaceCount == 2 ) //DD MM SS.ssssss
1873
1873
{
@@ -1883,7 +1883,7 @@ function identifyInputType(userEntry) {
1883
1883
1884
1884
var seconds = Number ( data [ 2 ] ) ; //Get SS.ssssss
1885
1885
convertedCoordinate = decimal + ( minutes / 60.0 ) + ( seconds / 3600.0 ) ;
1886
- if ( negativeSign ) convertedCoordinate *= - 1 ;
1886
+ if ( negativeSign ) convertedCoordinate *= - 1.0 ;
1887
1887
}
1888
1888
1889
1889
console . log ( "convertedCoordinate: " + Number ( convertedCoordinate ) . toFixed ( 9 ) ) ;
0 commit comments