Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d37d37

Browse files
committed
create Albers GeoJSON features
1 parent 22d5343 commit 7d37d37

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

app/_constants/geosjon-features.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as topojson from "topojson-client";
2+
import Albers from "../data/topoJSON/albers.topo.json";
3+
4+
export const AlbersNation = () => {
5+
const { features } = topojson.feature(Albers, "nation");
6+
return features;
7+
};
8+
9+
export const AlbersStates = () => {
10+
const { features } = topojson.feature(Albers, "states");
11+
return features;
12+
};
13+
14+
export const AlbersCounties = () => {
15+
const { features } = topojson.feature(Albers, "counties");
16+
return features;
17+
};

0 commit comments

Comments
 (0)