DMS display on MouseMove
Puneet Kishor
punkish at EIDESIS.ORG
Wed Feb 8 06:06:48 PST 2006
william paul wrote:
> Hi:
>
> I display the coordinates on mousemove over the map. The coordinates are
> in DD and UTM, but I would like display them also in DMS.
>
From the very first hit on Google --
(1) The Degrees are simply the numbers to the left of the decimal
(using 42.36824 as an example, the degrees would be 42)
(2) To determine the Minutes, multiply the number to the right of
the decimal point by 60 (example: .36824 x 60 = 22.0944)
(3) The Minutes are the numbers to the left of the decimal point
(in this example, 22)
(4) To determine the Seconds, multiply the number to the right of
the decimal point by 60 (example: .0944 x 60 = 5.664)
(5) The Seconds are the numbers to the left of the decimal point,
rounded up (in this example, 06)
Implementing it in Js is left as an exercise for the reader...
More information about the MapServer-users
mailing list