@geoblocks/ol-comfy
    Preparing search index...

    Function coordinateToDMS

    • Format one coordinate (x or y) to DMS coordinate. Example: coordinateToDMS(7.1234, 'EW', 2) becomes 7° 07' 24.23" E coordinateToDMS(46.1234, 'NS', 0) becomes 46° 43' 18 N

      Parameters

      • degrees: number

        the x or y coordinates in degree.

      • hemispheres: string

        NS or EW, the detection is automatic.

      • OptionalfractionDigits: number

        the precision to keep on the seconds. Default to 0.

      Returns string

      the formated coordinate.