OpenLayers.Util.getFormattedLonLat does not deal correctly with 60 seconds and 60 minutes, p=mattnott,jorix, r=me,marcjansen (closes #2852)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11405 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde committed 2011-02-24 11:24:50 +00:00
1 parent 680923319c
commit 07e34672b5
2 files changed
+15

No files matched your search

+9
View File
@@ -1849,6 +1849,15 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
coordinateseconds = Math.round(coordinateseconds*10);
coordinateseconds /= 10;
if( coordinateseconds >= 60) {
coordinateseconds -= 60;
coordinateminutes += 1;
if( coordinateminutes >= 60) {
coordinateminutes -= 60;
coordinatedegrees += 1;
}
}
if( coordinatedegrees < 10 ) {
coordinatedegrees = "0" + coordinatedegrees;
}