blob: d1e143be51823038afd39d94608b7d4d9202d04f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# coordinates
```js
// usage
chance.coordinates()
chance.coordinates({fixed: 2})
chance.coordinates({format: 'dms'})
```
Generate random coordinates, which are latitude and longitude, comma separated.
```js
chance.coordinates();
=> "-29.52974, 24.52815"
```
By default includes 5 fixed digits after decimal, can specify otherwise.
```js
chance.coordinates({fixed: 2});
=> "-49.16, 68.81"
```
By default cooridnates' format is dd, can specify otherwise.
```js
chance.coordinates({format: 'ddm'});
=> "41°44.9592, 25°56.2622"
```
```js
chance.coordinates({format: 'dms'});
=> "56°2’9.8187”, 79°55’40.6812”"
```
|