geo-coordinates-parser 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -76,7 +76,8 @@ convert.formats
76
76
  **<span style="color:red">Note that formats like 24.56S 26.48E are treated as degrees and minutes! And 24.0, 26.0 is treated as an error. If you don't want this behaviour you need to catch these cases with your own code before you use convert.</span>**
77
77
 
78
78
  ### Want to use it in the browser?
79
- A ready bundled script is available in the source code, in the bundle directory, named geocoordsparser.js. [Download](https://stackoverflow.com/a/13593430/3210158), include it in a script tag in your html, and you'll have a function called `convert()` available in your environment.
79
+ Add ```<script src="https://cdn.jsdelivr.net/npm/geo-coordinates-parser/bundle/geocoordsparser.js"></script>```
80
+ to your html head and you'll have the ```convert``` function available globally. You won't have .formats, .closeEnough or .toCoordinateFormat though, only the coordinates conversion function.
80
81
 
81
82
  ### Convert back to standard formats
82
83
  Sometimes we might want to convert back to more traditional formats for representing coordinates, such as DMS or DM. This can be useful for standardizing coordinates. The convert function has an enum to help.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geo-coordinates-parser",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "A Javascript function for reading a variety of coordinate formats and converting to decimal numbers. Builds on other efforts by returning the verbatim coordinates and the decimal coordinates all in one object.",
5
5
  "main": "merge.js",
6
6
  "scripts": {
package/testformats.js CHANGED
@@ -265,6 +265,13 @@ var otherFormats = [
265
265
  verbatimLongitude: '18.32.53E',
266
266
  decimalLatitude: -27.2625,
267
267
  decimalLongitude: 18.548055
268
+ },
269
+ {
270
+ verbatimCoordinates: '27,71372° S 23,07771° E', //decimals with commas
271
+ verbatimLatitude: '27,71372° S',
272
+ verbatimLongitude: '23,07771° E',
273
+ decimalLatitude: -27.71372,
274
+ decimalLongitude: 23.07771
268
275
  }
269
276
  ]
270
277