You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: geopoly-demo/README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
5
5
## Description
6
6
7
-
This example demos using SQLite's built-in Geopoly extension with SQLite Cloud to create a local attractions finder map-plication.
7
+
This example demo'es using SQLite's built-in Geopoly extension with SQLite Cloud to create a local attractions finder map-plication.
8
8
9
-
To build the app from scratch and/or customize the attractions, read the[Tutorial](https://docs.sqlitecloud.io/docs/tutorial-geopoly) in the SQLite Cloud documentation.
9
+
To build the app from scratch, read this[Tutorial](https://docs.sqlitecloud.io/docs/tutorial-geopoly) in the SQLite Cloud documentation. To quickly try it out, read on!
10
10
11
11
## Tutorial TL;DR - Get up-and-exploring NYC attractions fast!
12
12
@@ -22,17 +22,19 @@ npm i
22
22
23
23
3.[Sign up](https://account.mapbox.com/auth/signup/) for an Individual Mapbox account. (We'll stay on the free tier.)
24
24
25
-
4.Create a `.env` file. Add 2 env vars:
25
+
4.In the `geopoly-demo` directory, create a `.env` file. Add 2 env vars:
26
26
27
27
-`REACT_APP_CONNECTION_STRING`. Copy/ paste your connection string from your SQLite Cloud account dashboard.
28
28
-`REACT_APP_MAPBOX_TOKEN`. In your Mapbox account dashboard's nav, click Tokens. Copy/ paste your default public token.
29
29
30
-
5. Run `npm run create-tables` to create 2 DB tables in the `geopoly-demo` database:
30
+
5. Also in the `geopoly-demo` dir, create a `data/geodata.json` file. Complete just step `2. Curate your GeoJSON data` in the app [Tutorial](https://docs.sqlitecloud.io/docs/tutorial-geopoly).
31
+
32
+
6. Run `npm run create-tables` to create 2 DB tables in the `geopoly-demo` database:
31
33
32
34
- a `polygons` table to store the polygons generated by Geopoly as you interact with the app map, and
33
-
- an `attractions` table to store NYC attraction geodata. Since `data/geodata.json`contains~2000 Point features, it will take a little time for this command to finish inserting the attractions as rows.
35
+
- an `attractions` table to store NYC attraction geodata. Since `data/geodata.json`will contain~2000 Point features, it will take a little time for this command to finish inserting the attractions as rows.
34
36
35
-
6. Run `npm start` to start your local dev server. Visit `http://localhost:3000/` (adjust the port as-needed) in your browser to view the app.
37
+
7. Run `npm start` to start your local dev server. Visit `http://localhost:3000/` (adjust the port as-needed) in your browser to view the app.
36
38
37
39
- The loaded map is centered at Central Park, NYC.
38
40
- In the geocoder (i.e. search input) at the top right of the map, enter "Empire" and select the "Empire State Building" search result.
0 commit comments