From 44f55d0c12b80dcc887503a524f1446d5d59dba9 Mon Sep 17 00:00:00 2001 From: cosmix Date: Tue, 6 Mar 2018 17:37:37 +0000 Subject: [PATCH] Update license and readme. Remove debug logging statmenets. (#3) --- LICENSE.md | 1 + README.md | 42 +----------------------------------------- src/serve_rendered.js | 2 -- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 60d6118..1160c6d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,6 +2,7 @@ TileServer GL ============= Copyright (c) 2016, Klokan Technologies GmbH +Copyright (c) 2018, Beat (markers feature) All rights reserved. diff --git a/README.md b/README.md index 044b31e..6130374 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,8 @@ -![tileserver-gl](https://cloud.githubusercontent.com/assets/59284/18173467/fa3aa2ca-7069-11e6-86b1-0f1266befeb6.jpeg) - - # TileServer GL -[![Build Status](https://travis-ci.org/klokantech/tileserver-gl.svg?branch=master)](https://travis-ci.org/klokantech/tileserver-gl) -[![Docker Hub](https://img.shields.io/badge/docker-hub-blue.svg)](https://hub.docker.com/r/klokantech/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. -## Get Started - -Make sure you have Node.js version **6** installed (running `node -v` it should output something like `v6.11.3`). - -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/). - -```bash -curl -o zurich_switzerland.mbtiles https://[GET-YOUR-LINK]/extracts/zurich_switzerland.mbtiles -``` - -Start `tileserver-gl` with the downloaded vector tiles. - -```bash -tileserver-gl zurich_switzerland.mbtiles -``` - -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. - -## Using 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: - -```bash -docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl -``` - -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. - -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. ## Documentation -You can read full documentation of this project at http://tileserver.readthedocs.io/. +You can read full documentation of the upstream project at http://tileserver.readthedocs.io/. diff --git a/src/serve_rendered.js b/src/serve_rendered.js index 9998707..8a7fc4b 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -591,10 +591,8 @@ module.exports = function(options, repo, params, id, dataResolver) { [markerImages[0], precisePx(path[0],z).map(function(loc,idx){ return (idx ==1)? loc - markerSize/2: loc - markerSize/2;})], [markerImages[1], precisePx(path[path.length-1],z).map(function(loc,idx){ return (idx == 1)?loc - markerSize/2: loc - markerSize/2;})] ]; - console.log(markers); markers.forEach(function(imgSpec){ - console.log(imgSpec); var coordinates = imgSpec[1]; ctx.drawImage(imgSpec[0], coordinates[0], coordinates[1], markerSize, markerSize); });