Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "coordinates/react-hooks/coordinate-unit"

Index

Type aliases

Variables

Functions

Type aliases

Props

Props: object

Type declaration

  • lat: number

    Lattitude

  • lon: number

    Longitude

  • unit: CoordinateUnit

    Coordinate unit

Variables

Const DEGREE_SYMBOL

DEGREE_SYMBOL: "°" = "°"

Functions

Const useCoordinateUnit

  • useCoordinateUnit(__namedParameters: object): string[]
  • Converts a lat/lon decimal pair to a string representation of that selected coordinate unit. Example usage:

    const coordinates = useCoordinateUnit({ lat, lon, coordinateUnit })
    return (
      <Row>{
        coordinates.map(text => (
          <Column>{text}</Column>
        ))
      }</Row>
    )

    Parameters

    • __namedParameters: object
      • lat: number
      • lon: number
      • unit: "Lat/Lon (DD)" | "Lat/Lon (DMS)" | "USNG/MGRS" | "UTM/UPS"

    Returns string[]

    array of formatted strings divided at the point in which they should be semantically separated.

Generated using TypeDoc