dbarbalato / magellan

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

Parsing whole coordinate string #18

Closed brotkiste closed 6 years ago

brotkiste commented 6 years ago

Hi, what do you think about parsing a whole coordinate string, e.g.

47.12383N,11.8998E

and detecting lat / lng from N|S and E|W ? For coordinates without NSEW it could be possible to guess based on values (e.g. lat can't be bigger than 90) or to configure a default order.

I would be happy to give it a try if you think thats sensible.

brotkiste commented 6 years ago

Oh ok, just took a closer look to your code, apparently you are already doing that