Skip to content

RedfishGroup/parseLatLon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Parse Latitude Longitude string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published