dmitry-ra / geotext

Parsing and displaying geographic coordinates according to ISO 6709 Annex D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##Intro

Geotext is a very small JavaScript library for parsing and displaying geographic coordinates according to ISO 6709 Annex D.

##Live demo http://dmitry-ra.github.io/geotext/

##Features

  • The order of coordinates does not matter to parse (lat/lon or lon/lat)
  • You can set your own unit symbol for altitude
  • Supported decimal mark is dot . comma , or momayyez ٫

##Files

  • geoprint.js - functions to convert numeric values of coordinates to a string
  • geoparse.js - parsing text representation of the coordinates to numeric values

##Caveats GeoText.parse(...) is tolerant to spaces in minutes and seconds, but not in degrees and altitude. So 42°3 0'N is 42.5, but 4 2°30'N is 2.5.

##License

See LICENSE.

About

Parsing and displaying geographic coordinates according to ISO 6709 Annex D

License:MIT License


Languages

Language:JavaScript 100.0%