forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.ts
More file actions
36 lines (32 loc) · 762 Bytes
/
data.ts
File metadata and controls
36 lines (32 loc) · 762 Bytes
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
35
36
interface LineFeature {
geometry: {
type: string;
coordinates: number[][];
};
}
export const coordLinesData = {
type: 'FeatureCollection',
features: [] as LineFeature[],
};
// add meridians
for (let longitude = -180; longitude <= 180; longitude += 30) {
const lineCoords: number[][] = [];
for (let latitude = -90; latitude <= 90; latitude += 5) {
lineCoords.push([longitude, latitude]);
}
coordLinesData.features.push({
geometry: {
type: 'LineString',
coordinates: lineCoords,
},
});
}
// add parallels
for (let latitude = -90; latitude <= 90; latitude += 30) {
coordLinesData.features.push({
geometry: {
type: 'LineString',
coordinates: [[-180, latitude], [180, latitude]],
},
});
}