Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit a2f2942

Browse files
author
Jin IGARASHI
committed
changed module from postgis2geojson to postgis2mbtiles
1 parent 414a878 commit a2f2942

File tree

4 files changed

+34
-28
lines changed

4 files changed

+34
-28
lines changed

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
services:
33
nodejs:
4-
image: narwassco/vt-map
4+
image: narwassco/vt-map:v0.0.2
55
#build: .
66
env_file:
77
- ./app-docker.env

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
const postgis2geojson = require('postgis2geojson');
1+
const postgis2mbtiles = require('postgis2mbtiles');
22
const Mbtiles2pbf = require('mbtiles2pbf');
3+
const {postgis2geojson} = require('@watergis/postgis2geojson');
34
const config = require('./config');
45
const configSearch = require('./config-search');
56

@@ -8,8 +9,8 @@ const VtMapCreator = () =>{
89
//create geojson file for search function
910
createGeoJSONSearch();
1011

11-
const pg2json = new postgis2geojson(config);
12-
pg2json.run().then(res=>{
12+
const pg2mbtiles = new postgis2mbtiles(config);
13+
pg2mbtiles.run().then(res=>{
1314
console.log(res);
1415
//create mapbox vectortile
1516
const mbtiles2pbf = new Mbtiles2pbf(config.mbtiles, config.ghpages.tiles);
@@ -24,7 +25,7 @@ const VtMapCreator = () =>{
2425

2526
const createGeoJSONSearch = async() =>{
2627
const pg2json = new postgis2geojson(configSearch);
27-
await pg2json.dump().then(res=>{
28+
await pg2json.run().then(res=>{
2829
res.forEach(f=>{console.log(f)});
2930
}).catch(err=>{console.log(err)});
3031
}

package-lock.json

Lines changed: 26 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
},
2020
"homepage": "https://github.com/narwassco/vt-map#readme",
2121
"dependencies": {
22+
"@watergis/postgis2geojson": "^0.1.1",
2223
"dotenv": "^8.2.0",
2324
"mbtiles2pbf": "git+https://github.com/narwassco/mbtiles2pbf.git",
24-
"postgis2geojson": "git+https://github.com/narwassco/postgis2geojson.git"
25+
"postgis2mbtiles": "git+https://github.com/narwassco/postgis2mbtiles.git"
2526
},
2627
"devDependencies": {
2728
"gh-pages": "^3.0.0"

0 commit comments

Comments
 (0)