1.0.2 • Published 4 years ago

parselatlon v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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

ParamType
inputStringString

© 2020 Redifish Group LLC