All Projects → philippeauriach → vector-tiles-generator

philippeauriach / vector-tiles-generator

Licence: other
Easily generating mapbox vector tiles from postgis database (without mapnik dependency)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vector-tiles-generator

eGyan
eGyan is a web application built with Node.js (Express) and Hasura (https://hasura.io/) Platform. It is a simple and effective eLearning app for everyone.
Stars: ✭ 36 (+80%)
Mutual labels:  expressjs
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (+10%)
Mutual labels:  expressjs
QuickStarter
Quick nodejs (Express) + docker + mongodb + JEST(testing) setup.
Stars: ✭ 12 (-40%)
Mutual labels:  expressjs
lightning-rpc-explorer
Simple, self-hosted lightning network explorer.
Stars: ✭ 45 (+125%)
Mutual labels:  expressjs
inventory-demo
a simple MERN stack CRUD app example
Stars: ✭ 15 (-25%)
Mutual labels:  expressjs
api-server
📡 API server for api.cdnjs.com - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 48 (+140%)
Mutual labels:  expressjs
docker-node-mongo-react-STARTER
🐋 🍃 ⚛️ Boilerplate for Node.js, MongoDB, React Applications (with Docker)
Stars: ✭ 34 (+70%)
Mutual labels:  expressjs
buddies-tube
A video streaming platform
Stars: ✭ 14 (-30%)
Mutual labels:  expressjs
express-mvc-generator
Express' Model View Controller Application Generator.
Stars: ✭ 46 (+130%)
Mutual labels:  expressjs
trivin
⚡️Setup your entire project quickly and easily with 1-line command ⚡️
Stars: ✭ 58 (+190%)
Mutual labels:  expressjs
faeshare
MERN based social media web app made with the help of Next.js, Socket.io and TailwindCSS.
Stars: ✭ 37 (+85%)
Mutual labels:  expressjs
mean-stack
MEAN stack Mongoose, Express, Angular6, Node
Stars: ✭ 22 (+10%)
Mutual labels:  expressjs
nestjs-cookie-session
Idiomatic Cookie Session Module for NestJS. Built on top of `cookie-session` 😻
Stars: ✭ 35 (+75%)
Mutual labels:  expressjs
task-manager
Task Manager App
Stars: ✭ 19 (-5%)
Mutual labels:  expressjs
kirby-locator
A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 only.
Stars: ✭ 83 (+315%)
Mutual labels:  mapbox
express-mysql-rest
Building the simple api with sequelize, mysql and express js. this repository contains the code about how to use sequelize with mysql at express js. for example i have provide the crud operation to this repository. You can also testing the api with chai and mocha with chai-http by this repository
Stars: ✭ 25 (+25%)
Mutual labels:  expressjs
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+155%)
Mutual labels:  expressjs
uploading-files-react-node
Uploading files with React.js and Node.js
Stars: ✭ 33 (+65%)
Mutual labels:  expressjs
watson-discovery-analyze-data-breaches
A Node.js application that demonstrates how to Import, Enrich, and see Insights about data using Watson Discovery.
Stars: ✭ 20 (+0%)
Mutual labels:  expressjs
OL-RouteAnimate
基于openlayer的原生轨迹动画
Stars: ✭ 31 (+55%)
Mutual labels:  mapbox

vector-tiles-generator

installation

yarn add vector-tiles-generator

usage with express

var VectorTileGenerator = require('vector-tiles-generator');

// initialize once your generator
var vectorTileGenerator = new VectorTileGenerator({
  pgPool: pool // you must provide your own pg-pool
});

app.get('/layer/:z/:x/:y.mvt', function(req, res) {
  var tile = {
    x: parseInt(req.params.x),
    y: parseInt(req.params.y),
    z: parseInt(req.params.z)
  };

  // nothing before zoom level 9
  if(tile.z < 9) {
    return res.status(204).send();  // 204 empty status for mapbox
  }

  return vectorTileGenerator.get({
    points: `SELECT name, ST_AsGeoJSON(ST_Transform(way, 4326)) as the_geom_geojson
              FROM planet_osm_polygon WHERE way && !bbox!`  // !bbox! will be replaced
  }, tile)
  .then(function(result) {
    if(!result || result.length === 0) {
      return res.status(204).send();  // handle empty status for mapbox
    }
    return res.send(result);
  });
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].