diff --git a/.dockerignore b/.dockerignore index fee5276..1661d17 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ -.git -docs/_build -node_modules -test_data -light -config.json -*.mbtiles +* +!src +!public +!test +!package.json +!package-lock.json +!docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index f7675fd..f254a25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,84 @@ -FROM node:10-stretch +FROM ubuntu:focal AS builder ENV NODE_ENV="production" -VOLUME /data -WORKDIR /data -EXPOSE 80 -ENTRYPOINT ["/bin/bash", "/usr/src/app/run.sh"] -HEALTHCHECK CMD node /usr/src/app/src/healthcheck.js -RUN apt-get -qq update \ -&& DEBIAN_FRONTEND=noninteractive apt-get -y install \ - apt-transport-https \ - curl \ - unzip \ - build-essential \ - python \ - libcairo2-dev \ - libgles2-mesa-dev \ - libgbm-dev \ - libllvm3.9 \ - libprotobuf-dev \ - libxxf86vm-dev \ - xvfb \ - x11-utils \ -&& apt-get clean +RUN set -ex; \ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get -qq update; \ + apt-get -y --no-install-recommends install \ + build-essential \ + ca-certificates \ + wget \ + pkg-config \ + xvfb \ + libglfw3-dev \ + libuv1-dev \ + libjpeg-turbo8 \ + libicu66 \ + libcairo2-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libgif-dev \ + librsvg2-dev \ + libcurl4-openssl-dev \ + libpixman-1-dev; \ + wget -qO- https://deb.nodesource.com/setup_16.x | bash; \ + apt-get install -y nodejs; \ + apt-get -y remove wget; \ + apt-get -y --purge autoremove; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; RUN mkdir -p /usr/src/app -COPY / /usr/src/app -RUN cd /usr/src/app && npm install --production +COPY package* /usr/src/app/ + +RUN cd /usr/src/app && npm ci --omit=dev + +FROM ubuntu:focal AS final + +ENV \ + NODE_ENV="production" \ + CHOKIDAR_USEPOLLING=1 \ + CHOKIDAR_INTERVAL=500 + +RUN set -ex; \ + export DEBIAN_FRONTEND=noninteractive; \ + groupadd -r node; \ + useradd -r -g node node; \ + apt-get -qq update; \ + apt-get -y --no-install-recommends install \ + ca-certificates \ + wget \ + xvfb \ + libglfw3 \ + libuv1 \ + libjpeg-turbo8 \ + libicu66 \ + libcairo2 \ + libgif7 \ + libopengl0 \ + libpixman-1-0 \ + libcurl4 \ + librsvg2-2 \ + libpango1.0; \ + wget -qO- https://deb.nodesource.com/setup_16.x | bash; \ + apt-get install -y nodejs; \ + apt-get -y remove wget; \ + apt-get -y --purge autoremove; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; + +COPY --from=builder /usr/src/app /usr/src/app + +COPY . /usr/src/app + +VOLUME /data +WORKDIR /data + +EXPOSE 80 + +USER node:node + +ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"] + +HEALTHCHECK CMD node /usr/src/app/src/healthcheck.js diff --git a/Dockerfile_light b/Dockerfile_light index 79639c2..4fa8ea0 100644 --- a/Dockerfile_light +++ b/Dockerfile_light @@ -1,12 +1,34 @@ -FROM node:10-stretch +FROM ubuntu:focal + +ENV \ + NODE_ENV="production" \ + CHOKIDAR_USEPOLLING=1 \ + CHOKIDAR_INTERVAL=500 + +RUN set -ex; \ + export DEBIAN_FRONTEND=noninteractive; \ + groupadd -r node; \ + useradd -r -g node node; \ + apt-get -qq update; \ + apt-get -y --no-install-recommends install \ + ca-certificates \ + wget; \ + wget -qO- https://deb.nodesource.com/setup_16.x | bash; \ + apt-get install -y nodejs; \ + apt-get -y remove wget; \ + apt-get -y --purge autoremove; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; -ENV NODE_ENV="production" EXPOSE 80 VOLUME /data WORKDIR /data -ENTRYPOINT ["node", "/usr/src/app/", "-p", "80"] -HEALTHCHECK CMD node /usr/src/app/src/healthcheck.js + +ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"] RUN mkdir -p /usr/src/app COPY / /usr/src/app -RUN cd /usr/src/app && npm install --production +RUN cd /usr/src/app && npm install --omit=dev +RUN ["chmod", "+x", "/usr/src/app/docker-entrypoint.sh"] +USER node:node +HEALTHCHECK CMD node /usr/src/app/src/healthcheck.js diff --git a/Dockerfile_test b/Dockerfile_test index 37d34f8..f5b743f 100644 --- a/Dockerfile_test +++ b/Dockerfile_test @@ -2,33 +2,43 @@ # Simply run "docker build -f Dockerfile_test ." # WARNING: sometimes it fails with a core dumped exception -FROM node:10-stretch +FROM ubuntu:focal -RUN apt-get -qq update \ -&& DEBIAN_FRONTEND=noninteractive apt-get -y install \ - apt-transport-https \ - curl \ - unzip \ - build-essential \ - python \ - libcairo2-dev \ - libgles2-mesa-dev \ - libgbm-dev \ - libllvm3.9 \ - libprotobuf-dev \ - libxxf86vm-dev \ - xvfb \ -&& apt-get clean +ENV NODE_ENV="development" + +RUN set -ex; \ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get -qq update; \ + apt-get -y --no-install-recommends install \ + unzip \ + build-essential \ + ca-certificates \ + wget \ + pkg-config \ + xvfb \ + libglfw3-dev \ + libuv1-dev \ + libjpeg-turbo8 \ + libicu66 \ + libcairo2-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libgif-dev \ + librsvg2-dev \ + libcurl4-openssl-dev \ + libpixman-1-dev; \ + wget -qO- https://deb.nodesource.com/setup_16.x | bash; \ + apt-get install -y nodejs; \ + apt-get clean; RUN mkdir -p /usr/src/app WORKDIR /usr/src/app -RUN wget -O test_data.zip https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip -RUN unzip -q test_data.zip -d test_data - -ENV NODE_ENV="test" +RUN wget -O test_data.zip https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip; \ + unzip -q test_data.zip -d test_data COPY package.json . RUN npm install COPY / . + RUN xvfb-run --server-args="-screen 0 1024x768x24" npm test diff --git a/PUBLISHING.md b/PUBLISHING.md index cd9cd31..8b41b6b 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -3,4 +3,11 @@ - Update version in `package.json` - `git tag vx.x.x` - `git push --tags` -- `node publish.js` (publishes packages to npm) +- `docker buildx build --platform linux/amd64 -t maptiler/tileserver-gl:latest -t maptiler/tileserver-gl:[version] .` +- `docker push maptiler/tileserver-gl --all-tags` +- `npm publish --access public` or `node publish.js` +- `node publish.js --no-publish` +- `cd light` +- `docker buildx build --platform linux/amd64 -t maptiler/tileserver-gl-light:latest -t maptiler/tileserver-gl-light:[version] .` +- `docker push maptiler/tileserver-gl-light --all-tags` +- `npm publish --access public` diff --git a/README.md b/README.md index 8dd163d..971250a 100644 --- a/README.md +++ b/README.md @@ -3,46 +3,87 @@ # TileServer GL [](https://travis-ci.org/maptiler/tileserver-gl) -[](https://hub.docker.com/r/klokantech/tileserver-gl/) +[](https://hub.docker.com/r/maptiler/tileserver-gl/) -Vector and raster maps with GL styles. Server side rendering by Mapbox GL Native. Map tile server for Mapbox GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc. +Vector and raster maps with GL styles. Server-side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc. -## Get Started +Download vector tiles from [OpenMapTiles](https://data.maptiler.com/downloads/planet/). +## Getting Started with Node -Make sure you have Node.js version **10** installed (running `node -v` it should output something like `v10.17.0`). +Make sure you have Node.js version **14.20.0** or above installed. Node 16 is recommended. (running `node -v` it should output something like `v16.x.x`). Running without docker requires [Native dependencies](https://tileserver.readthedocs.io/en/latest/installation.html#npm) to be installed first. -Install `tileserver-gl` with server-side raster rendering of vector tiles with npm +Install `tileserver-gl` with server-side raster rendering of vector tiles with npm. ```bash npm install -g tileserver-gl ``` -Now download vector tiles from [OpenMapTiles](https://openmaptiles.org/downloads/). +Once installed, you can use it like the following examples. +using a mbtiles file ```bash -curl -o zurich_switzerland.mbtiles https://[GET-YOUR-LINK]/extracts/zurich_switzerland.mbtiles +wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles +tileserver-gl --mbtiles zurich_switzerland.mbtiles +[in your browser, visit http://[server ip]:8080] ``` -Start `tileserver-gl` with the downloaded vector tiles. - +using a config.json + style + mbtiles file ```bash -tileserver-gl zurich_switzerland.mbtiles +wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip +unzip test_data.zip +tileserver-gl +[in your browser, visit http://[server ip]:8080] ``` -Alternatively, you can use the `tileserver-gl-light` package instead, which is pure javascript (does not have any native dependencies) and can run anywhere, but does not contain rasterization on the server side made with MapBox GL Native. +Alternatively, you can use the `tileserver-gl-light` npm package instead, which is pure javascript, does not have any native dependencies, and can run anywhere, but does not contain rasterization on the server side made with Maplibre GL Native. -## Using Docker +## Getting Started with Docker -An alternative to npm to start the packed software easier is to install [Docker](http://www.docker.com/) on your computer and then run in the directory with the downloaded MBTiles the command: +An alternative to npm to start the packed software easier is to install [Docker](https://www.docker.com/) on your computer and then run from the tileserver-gl directory +Example using a mbtiles file ```bash -docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl +wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles +docker run --rm -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl --mbtiles zurich_switzerland.mbtiles +[in your browser, visit http://[server ip]:8080] ``` -This will download and start a ready to use container on your computer and the maps are going to be available in webbrowser on localhost:8080. +Example using a config.json + style + mbtiles file +```bash +wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip +unzip test_data.zip +docker run --rm -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl +[in your browser, visit http://[server ip]:8080] +``` -On laptop you can use [Docker Kitematic](https://kitematic.com/) and search "tileserver-gl" and run it, then drop in the 'data' folder the MBTiles. +Example using a different path +```bash +docker run --rm -it -v /your/local/config/path:/data -p 8080:80 maptiler/tileserver-gl +``` +replace '/your/local/config/path' with the path to your config file + + +Alternatively, you can use the `maptiler/tileserver-gl-light` docker image instead, which is pure javascript, does not have any native dependencies, and can run anywhere, but does not contain rasterization on the server side made with Maplibre GL Native. + +## Getting Started with Linux cli + +Test from command line +```bash +wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip +unzip -q test_data.zip -d test_data +xvfb-run --server-args="-screen 0 1024x768x24" npm test +``` + +Run from command line +```bash +xvfb-run --server-args="-screen 0 1024x768x24" node . +``` ## Documentation -You can read full documentation of this project at http://tileserver.readthedocs.io/. +You can read the full documentation of this project at https://tileserver.readthedocs.io/. + +## Alternative + +Discover MapTiler Server if you need a [map server with easy setup and user-friendly interface](https://www.maptiler.com/server/). + diff --git a/README_light.md b/README_light.md index b8df587..2e019ff 100644 --- a/README_light.md +++ b/README_light.md @@ -1,6 +1,6 @@ # TileServer GL light [](https://travis-ci.org/maptiler/tileserver-gl) -[](https://hub.docker.com/r/klokantech/tileserver-gl/) +[](https://hub.docker.com/r/maptiler/tileserver-gl/) Vector maps with GL styles. Map tile server for Mapbox Android, iOS, GL JS, Leaflet, OpenLayers, etc. without server side rendering. @@ -11,7 +11,25 @@ Then you can simply run `tileserver-gl-light zurich_switzerland.mbtiles` to star See also `tileserver-gl` which contains server side rendering. -Prepared vector tiles can be downloaded from [OpenMapTiles](https://openmaptiles.org/downloads/). +Prepared vector tiles can be downloaded from [OpenMapTiles.com](https://openmaptiles.com/downloads/planet/). + +## Building docker image + +You can build TileServer GL light image from source. + +``` +git clone https://github.com/maptiler/tileserver-gl.git +cd tileserver-gl +node publish.js --no-publish +cd light +docker build -t tileserver-gl-light . +``` + +[Download from OpenMapTiles.com](https://openmaptiles.com/downloads/planet/) or [create](https://github.com/openmaptiles/openmaptiles) your vector tile, and run following in directory contains your *.mbtiles. + +``` +docker run --rm -it -v $(pwd):/data -p 8000:80 tileserver-gl-light +``` ## Documentation -You can read full documentation of this project at http://tileserver.readthedocs.io/. \ No newline at end of file +You can read full documentation of this project at https://tileserver.readthedocs.io/. \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..b4defe6 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +handle() { + SIGNAL=$(( $? - 128 )) + echo "Caught signal ${SIGNAL}, stopping gracefully" + kill -s ${SIGNAL} $(pidof node) 2>/dev/null +} + +trap handle INT TERM + +refresh() { + SIGNAL=$(( $? - 128 )) + echo "Caught signal ${SIGNAL}, refreshing" + kill -s ${SIGNAL} $(pidof node) 2>/dev/null +} + +trap refresh HUP + +if ! which -- "${1}"; then + # first arg is not an executable + xvfb-run -a --server-args="-screen 0 1024x768x24" -- node /usr/src/app/ -p 80 "$@" & + # Wait exits immediately on signals which have traps set. Store return value and wait + # again for all jobs to actually complete before continuing. + wait $! || RETVAL=$? + while [ ${RETVAL} = 129 ] ; do + # Refressh signal HUP received. Continue waiting for signals. + wait $! || RETVAL=$? + done + wait + exit ${RETVAL} +fi + +exec "$@" diff --git a/docker-entrypoint_light.sh b/docker-entrypoint_light.sh new file mode 100644 index 0000000..e3c1c67 --- /dev/null +++ b/docker-entrypoint_light.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +handle() { + SIGNAL=$(( $? - 128 )) + echo "Caught signal ${SIGNAL}, stopping gracefully" + kill -s ${SIGNAL} $(pidof node) 2>/dev/null +} + +trap handle INT TERM + +refresh() { + SIGNAL=$(( $? - 128 )) + echo "Caught signal ${SIGNAL}, refreshing" + kill -s ${SIGNAL} $(pidof node) 2>/dev/null +} + +trap refresh HUP + +if ! which -- "${1}"; then + # first arg is not an executable + node /usr/src/app/ -p 80 "$@" & + # Wait exits immediately on signals which have traps set. Store return value and wait + # again for all jobs to actually complete before continuing. + wait $! || RETVAL=$? + while [ ${RETVAL} = 129 ] ; do + # Refressh signal HUP received. Continue waiting for signals. + wait $! || RETVAL=$? + done + wait + exit ${RETVAL} +fi + +exec "$@" diff --git a/docs/conf.py b/docs/conf.py index 688edca..2f315ea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,7 +44,7 @@ master_doc = 'index' # General information about the project. project = u'TileServer GL' -copyright = u'2016, Klokan Technologies GmbH' +copyright = u'2022, MapTiler.com' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -197,7 +197,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'TileServerGL.tex', u'TileServer GL Documentation', - u'Klokan Technologies GmbH', 'manual'), + u'MapTiler.com', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -227,7 +227,7 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'tileservergl', u'TileServer GL Documentation', - [u'Klokan Technologies GmbH'], 1) + [u'MapTiler.com'], 1) ] # If true, show URL addresses after external links. @@ -241,7 +241,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'TileServerGL', u'TileServer GL Documentation', - u'Klokan Technologies GmbH', 'TileServerGL', 'One line description of project.', + u'MapTiler.com', 'TileServerGL', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/config.rst b/docs/config.rst index b7034af..2164080 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -4,7 +4,9 @@ Configuration file The configuration file defines the behavior of the application. It's a regular JSON file. -Example:: +Example: + +.. code-block:: json { "options": { @@ -12,6 +14,7 @@ Example:: "root": "", "fonts": "fonts", "sprites": "sprites", + "icons": "icons", "styles": "styles", "mbtiles": "" }, @@ -27,7 +30,9 @@ Example:: "maxSize": 2048, "pbfAlias": "pbf", "serveAllFonts": false, + "serveAllStyles": false, "serveStaticMaps": true, + "allowRemoteMarkerIcons": true, "tileMargin": 0 }, "styles": { @@ -99,9 +104,9 @@ Default is ``2048``. ``tileMargin`` -------------- -Additional image side length added during tile rendering that is cropped from the delivered tile. This is useful for resolving the issue with cropped labels, -but it does come with a performance degradation, because additional, adjacent vector tiles need to be loaded to genenrate a single tile. -Default is ``0`` to disable this processing. +Additional image side length added during tile rendering that is cropped from the delivered tile. This is useful for resolving the issue with cropped labels, +but it does come with a performance degradation, because additional, adjacent vector tiles need to be loaded to generate a single tile. +Default is ``0`` to disable this processing. ``minRendererPoolSizes`` ------------------------ @@ -124,6 +129,13 @@ If you have plenty of memory, try setting these equal to or slightly above your If you need to conserve memory, try lower values for scale factors that are less common. Default is ``[16, 8, 4]``. +``serveAllStyles`` +------------------------ + +If this option is enabled, all the styles from the ``paths.styles`` will be served. (No recursion, only ``.json`` files are used.) +The process will also watch for changes in this directory and remove/add more styles dynamically. +It is recommended to also use the ``serveAllFonts`` option when using this option. + ``watermark`` ----------- @@ -131,6 +143,13 @@ Optional string to be rendered into the raster tiles (and static maps) as waterm Can be used for hard-coding attributions etc. (can also be specified per-style). Not used by default. +``allowRemoteMarkerIcons`` +-------------- + +Allows the rendering of marker icons fetched via http(s) hyperlinks. +For security reasons only allow this if you can control the origins from where the markers are fetched! +Default is to disallow fetching of icons from remote sources. + ``styles`` ========== @@ -138,7 +157,7 @@ Each item in this object defines one style (map). It can have the following opti * ``style`` -- name of the style json file [required] * ``serve_rendered`` -- whether to render the raster tiles for this style or not -* ``serve_data`` -- whether to allow acces to the original tiles, sprites and required glyphs +* ``serve_data`` -- whether to allow access to the original tiles, sprites and required glyphs * ``tilejson`` -- properties to add to the TileJSON created for the raster data * ``format`` and ``bounds`` can be especially useful diff --git a/docs/deployment.rst b/docs/deployment.rst index 3dff3ae..98aecb0 100644 --- a/docs/deployment.rst +++ b/docs/deployment.rst @@ -2,7 +2,7 @@ Deployment ========== -Typically - you should use nginx/lighttpd/apache on the frontend - and the tileserver-gl server is hidden behind it in production deployment. +Typically, you should use nginx, lighttpd or apache on the frontend. The tileserver-gl server is hidden behind it in production deployment. Caching ======= @@ -17,4 +17,4 @@ Nginx can be used to add protection via https, password, referrer, IP address re Running behind a proxy or a load-balancer ========================================= -If you need to run TileServer GL behind a proxy, make sure the proxy sends ``X-Forwarded-*`` headers to the server (most importantly ``X-Forwarded-Host`` and ``X-Forwarded-Proto``) to ensures the URLs generated inside TileJSON etc. are using the desired domain and protocol. +If you need to run TileServer GL behind a proxy, make sure the proxy sends ``X-Forwarded-*`` headers to the server (most importantly ``X-Forwarded-Host`` and ``X-Forwarded-Proto``) to ensure the URLs generated inside TileJSON, etc. are using the desired domain and protocol. diff --git a/docs/endpoints.rst b/docs/endpoints.rst index 57361fd..c4a0c7f 100644 --- a/docs/endpoints.rst +++ b/docs/endpoints.rst @@ -38,15 +38,41 @@ Static images * ``path`` - comma-separated ``lng,lat``, pipe-separated pairs * e.g. ``5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8`` + * can be provided multiple times - * ``latlng`` - indicates the ``path`` coordinates are in ``lat,lng`` order rather than the usual ``lng,lat`` + * ``latlng`` - indicates coordinates are in ``lat,lng`` order rather than the usual ``lng,lat`` * ``fill`` - color to use as the fill (e.g. ``red``, ``rgba(255,255,255,0.5)``, ``#0000ff``) * ``stroke`` - color of the path stroke * ``width`` - width of the stroke + * ``linecap`` - rendering style for the start and end points of the path + * ``linejoin`` - rendering style for overlapping segments of the path with differing directions + * ``border`` - color of the optional border path stroke + * ``borderwidth`` - width of the border stroke (default 10% of width) + * ``marker`` - Marker in format ``lng,lat|iconPath|option|option|...`` + + * Will be rendered with the bottom center at the provided location + * ``lng,lat`` and ``iconPath`` are mandatory and icons won't be rendered without them + * ``iconPath`` is either a link to an image served via http(s) or a path to a file relative to the configured icon path + * ``option`` must adhere to the format ``optionName:optionValue`` and supports the following names + + * ``scale`` - Factor to scale image by + + * e.g. ``0.5`` - Scales the image to half it's original size + + * ``offset`` - Image offset as positive or negative pixel value in format ``[offsetX],[offsetY]`` + + * scales with ``scale`` parameter since image placement is relative to it's size + * e.g. ``2,-4`` - Image will be moved 2 pixel to the right and 4 pixel in the upwards direction from the provided location + + * e.g. ``5.9,45.8|marker-start.svg|scale:0.5|offset:2,-4`` + * can be provided multiple times + * ``padding`` - "percentage" padding for fitted endpoints (area-based and path autofit) * value of ``0.1`` means "add 10% size to each side to make sure the area of interest is nicely visible" + * ``maxzoom`` - Maximum zoom level (only for auto endpoint where zoom level is calculated and not provided) + * You can also use (experimental) ``/styles/{id}/static/raw/...`` endpoints with raw spherical mercator coordinates (EPSG:3857) instead of WGS84. * The static images are not available in the ``tileserver-gl-light`` version. diff --git a/docs/installation.rst b/docs/installation.rst index 5e30ead..232ca7a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -7,12 +7,12 @@ Docker When running docker image, no special installation is needed -- the docker will automatically download the image if not present. -Just run ``docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl``. +Just run ``docker run --rm -it -v $(pwd):/data -p 8080:80 maptiler/tileserver-gl``. Additional options (see :doc:`/usage`) can be passed to the TileServer GL by appending them to the end of this command. You can, for example, do the following: -* ``docker run ... klokantech/tileserver-gl --mbtiles my-tiles.mbtiles`` -- explicitly specify which mbtiles to use (if you have more in the folder) -* ``docker run ... klokantech/tileserver-gl --verbose`` -- to see the default config created automatically +* ``docker run ... maptiler/tileserver-gl --mbtiles my-tiles.mbtiles`` -- explicitly specify which mbtiles to use (if you have more in the folder) +* ``docker run ... maptiler/tileserver-gl --verbose`` -- to see the default config created automatically npm === @@ -26,11 +26,30 @@ Native dependencies There are some native dependencies that you need to make sure are installed if you plan to run the TileServer GL natively without docker. The precise package names you need to install may differ on various platforms. -These are required on Debian 9: - * ``build-essential`` - * ``libcairo2-dev`` - * ``libprotobuf-dev`` +These are required on Debian 11: + * ``libgles2-mesa`` + * ``libegl1`` + * ``xvfb`` + * ``xauth`` + * ``libopengl0`` + * ``libcurl4`` + * ``curl`` + * ``libuv1-dev`` + * ``libc6-dev`` + * ``http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb`` + * ``http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb`` +These are required on Ubuntu 20.04: + * ``libcairo2-dev`` + * ``libjpeg8-dev`` + * ``libpango1.0-dev`` + * ``libgif-dev`` + * ``build-essential`` + * ``g++`` + * ``xvfb`` + * ``libgles2-mesa-dev`` + * ``libgbm-dev`` + * ``libxxf86vm-dev`` ``tileserver-gl-light`` on npm ============================== diff --git a/docs/usage.rst b/docs/usage.rst index fd1a197..127af2d 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -17,13 +17,22 @@ Getting started -b, --bind
Bind address -p, --port