Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 633 Bytes

File metadata and controls

33 lines (22 loc) · 633 Bytes

ParseLatLon

Parse a string into a longitude-latitude pair suitable for geojson.

parseLatLon ⇒ Array.<Number>

Supported Formats:

  • DD°MM.MMMM’
  • DD.DDDDDD°
  • DD° MM' SS"

Example:

parse(`35°25'01"N, 106°58'50"W`) // >> (2) [-106.98055555555555, 35.41694444444444]
parse("35.3434, -106.3434") // >> (2) [-106.3434, 35.3434]

Returns: Array.<Number> - [longitude, latitude]
Author: Cody Smith

Param Type
inputString String

© 2020 Redifish Group LLC