dbarbalato / magellan

JavaScript Latitude and Longitude Validation and Formatting
18 stars 12 forks source link

More coordinate formats and better precision. #3

Closed aectann closed 10 years ago

aectann commented 10 years ago

Adds support for yet another minute sign used by some wikis. Adds support for a format with no seconds, but with decimal minutes (used by google sometimes, e.g. 34° 9.829', -118° 3.249'). Fixes double '-' sign when degree is set to 0 on conversion to decimal representation.

aectann commented 10 years ago

Found some issues..

aectann commented 10 years ago

Fixed tests and regexp.

dbarbalato commented 10 years ago

Happy to see another contribution from you!

I'd like to merge your changes soon, but would be more comfortable doing so if you added some tests for the newly supported formats so that your contributions will be preserved as the library progresses.

Thanks again!

-Dave

aectann commented 10 years ago

I do not have time to add tests right now, but I'll try to find some later tonight or tomorrow.

dbarbalato commented 10 years ago

That's fine - I see you made some improvements to the tests while I was writing my previous comment so I'll go ahead and merge now. Any additional tests you wanted to write when you have the time would be great!