This commit is contained in:
Daniel García Aubert 2019-11-29 12:27:15 +01:00
parent a6ca480210
commit 52d887f3b4

View File

@ -2,9 +2,9 @@
[![Build Status](https://travis-ci.org/CartoDB/Windshaft-cartodb.svg?branch=master)](https://travis-ci.org/CartoDB/Windshaft-cartodb) [![Build Status](https://travis-ci.org/CartoDB/Windshaft-cartodb.svg?branch=master)](https://travis-ci.org/CartoDB/Windshaft-cartodb)
This is the [CARTO Maps API](http://docs.cartodb.com/cartodb-platform/maps-api.html) tiler. It extends [Windshaft](https://github.com/CartoDB/Windshaft) and exposes a complete web service with extra functionality: This is the [`CARTO Maps API`](http://docs.cartodb.com/cartodb-platform/maps-api.html) tiler. It extends [`Windshaft`](https://github.com/CartoDB/Windshaft) and exposes a complete web service with extra functionality:
* Intantiate [`Anonymous Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/03-anonymous-maps.md) through CARTO's map configuration ([MapConfig](https://github.com/CartoDB/Windshaft/blob/master/doc/MapConfig-specification.md)). * Instantiate [`Anonymous Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/03-anonymous-maps.md) through CARTO's map configuration ([`MapConfig`](https://github.com/CartoDB/Windshaft/blob/master/doc/MapConfig-specification.md)).
* Create [`Named Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/04-named-maps.md) based on customizables templates. * Create [`Named Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/04-named-maps.md) based on customizables templates.
* Get map previews through [`Static Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/05-static-maps-API.md) API. * Get map previews through [`Static Maps`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/05-static-maps-API.md) API.
* Render maps with large amount of data faster using [`Tile Aggregation`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/06-tile-aggregation.md). * Render maps with large amount of data faster using [`Tile Aggregation`](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/guides/06-tile-aggregation.md).
@ -26,15 +26,15 @@ This is the [CARTO Maps API](http://docs.cartodb.com/cartodb-platform/maps-api.h
### Optional ### Optional
* [Varnish](http://www.varnish-cache.org) * [`Varnish`](http://www.varnish-cache.org)
### PostGIS setup ### PostGIS setup
A `template_postgis` database is expected. One can be set up with A `template_postgis` database is expected. One can be set up with
```shell ```shell
createdb --owner postgres --template template0 template_postgis $ createdb --owner postgres --template template0 template_postgis
psql -d template_postgis -c 'CREATE EXTENSION postgis;' $ psql -d template_postgis -c 'CREATE EXTENSION postgis;'
``` ```
### Build ### Build
@ -42,7 +42,7 @@ psql -d template_postgis -c 'CREATE EXTENSION postgis;'
To fetch and build all node-based dependencies, run: To fetch and build all node-based dependencies, run:
```shell ```shell
npm ci $ npm ci
``` ```
### Run ### Run
@ -50,25 +50,24 @@ npm ci
Create the `./config/environments/<env>.js` file (there are `.example` files to start from). Look at `./lib/cartodb/server-options.js` for more on config. Create the `./config/environments/<env>.js` file (there are `.example` files to start from). Look at `./lib/cartodb/server-options.js` for more on config.
```shell ```shell
node app.js <env> $ node app.js <env>
``` ```
Where `<env>` is the name of a configuration file under `./config/environments/`. Where `<env>` is the name of a configuration file under `./config/environments/`.
## Documentation ## Documentation
The [docs directory](https://github.com/CartoDB/Windshaft-cartodb/tree/master/docs) contains different documentation resources, from higher level to more detailed ones: The [docs directory](https://github.com/CartoDB/Windshaft-cartodb/tree/master/docs) contains different documentation resources, from higher level to more detailed ones: the [Maps API](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/Map-API.md) document defines the endpoints and their expected parameters and outputs.
The [Maps API](https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/Map-API.md) defined the endpoints and their expected parameters and outputs.
### Examples ### Examples
[CartoDB's Map Gallery](http://cartodb.com/gallery/) showcases several examples of visualisations built on top of this. [CartoDB's Map Gallery](https://carto.com/platform/solutions-visualization/) showcases several examples of visualisations built on top of this.
## Contributing ## Contributing
The issue tracker: [github](https://github.com/CartoDB/Windshaft-cartodb/issues). The issue tracker: [`Github`](https://github.com/CartoDB/Windshaft-cartodb/issues).
We love pull requests from everyone, see [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/#contributing). We love pull requests from everyone, see [contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/#contributing).
### Submitting Contributions ### Submitting Contributions
@ -76,7 +75,7 @@ We love pull requests from everyone, see [Contributing to Open Source on GitHub]
### Developing with a custom windshaft version ### Developing with a custom windshaft version
If you plan or want to use a custom / not released yet version of windshaft (or any other dependency) the best option is to use `npm link`. You can read more about it at [npm-link: Symlink a package folder](https://docs.npmjs.com/cli/link.html). If you plan or want to use a custom / not released yet version of windshaft (or any other dependency) the best option is to use `npm link`. You can read more about it at `npm-link`: [symlink a package folder](https://docs.npmjs.com/cli/link.html).
```shell ```shell
$ cd /path/to/Windshaft $ cd /path/to/Windshaft