Giter VIP home page Giter VIP logo

maptiler / tileserver-gl Goto Github PK

View Code? Open in Web Editor NEW
2.1K 67.0 606.0 7.75 MB

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.

Home Page: https://maptiler-tileserver.readthedocs.io/

License: Other

JavaScript 84.52% Shell 0.24% CSS 13.09% Dockerfile 2.15%
tileserver wmts raster-map docker vector-tiles tileserver-gl gl-styles openmaptiles mapbox-gl-js maplibre-gl-js

tileserver-gl's Introduction

tileserver-gl

TileServer GL

GitHub Workflow Status Docker Hub

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.

Download vector tiles from OpenMapTiles.

Getting Started with Node

Make sure you have Node.js version 18.17.0 or above installed. Node 20 is recommended. (running node -v it should output something like v20.x.x). Running without docker requires Native dependencies to be installed first.

Install tileserver-gl with server-side raster rendering of vector tiles with npm.

npm install -g tileserver-gl

Once installed, you can use it like the following examples.

using a mbtiles file

wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles
tileserver-gl --file zurich_switzerland.mbtiles
[in your browser, visit http://[server ip]:8080]

using a config.json + style + mbtiles file

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 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.

Getting Started with Docker

An alternative to npm to start the packed software easier is to install Docker on your computer and then run from the tileserver-gl directory

Example using a mbtiles file

wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl --file zurich_switzerland.mbtiles
[in your browser, visit http://[server ip]:8080]

Example using a config.json + style + mbtiles file

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:8080 maptiler/tileserver-gl
[in your browser, visit http://[server ip]:8080]

Example using a different path

docker run --rm -it -v /your/local/config/path:/data -p 8080:8080 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

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

xvfb-run --server-args="-screen 0 1024x768x24" node .

Documentation

You can read the full documentation of this project at https://maptiler-tileserver.readthedocs.io/.

Alternative

Discover MapTiler Server if you need a map server with easy setup and user-friendly interface.

tileserver-gl's People

Contributors

0xflotus avatar acalcutt avatar albanm avatar alex-kowalczyk avatar boldtrn avatar caerbannog avatar candux avatar daliborjanak avatar dependabot[bot] avatar disarticulate avatar efi avatar guenhter avatar joakimfors avatar klokan avatar loicgasser avatar lukasmartinelli avatar mnutt avatar nyurik avatar oleksii-leonov avatar olipayne avatar petrsloup avatar smellman avatar spatialillusions avatar stefslon avatar stirringhalo avatar tschaub avatar vinayakkulkarni avatar wipfli avatar xabbu42 avatar zstadler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tileserver-gl's Issues

Serve style data (fonts, sprites, styles) + changed urls

New urls:

  • viewers
    • /index.html for raster/vector tiles
    • /styles.html for styles
  • styles
    • /styles.json array of style (version, name, id)
    • /styles/{style_id}.json - style json
    • /styles/{style_id}.html{options} - viewer with autodetection
    • /styles/{style_id}/sprite[@2x].{format}
  • /fonts/{font},{font}/{start}-{end}.pbf
    • ability to concatenate more pbfs
  • rasterized
    • /static/{style_id}/{lon},{lat},{zoom}[,{bearing}][,{pitch}]/{width}x{height}[@2x].{format}
      • add optional bearing and pitch
    • /static/{style_id}/{minx},{miny},{maxx},{maxy}/{zoom}[@2x].{format}
    • /raster.json - list of tilejsons
    • /raster/{style_id}/{z}/{x}/{y}[@2x].{format}
    • /raster/{style_id}.json -- tilejson + “style” property (link to /styles/{style_id}.json)
  • vector data
    • /vector.json - list of tilejsons
    • /vector/{mbtiles_name},{mbtiles_name}/{z}/{x}/{y}.pbf
      • ability to concatenate
    • /vector/{mbtiles_name},{mbtiles_name}.json -- tilejson
      • ability to merge
  • /index.json -- raster.json + vector.json
  • add option to turn off the vector tiles (per-style)

PNG quantization

The PNGs produced by the tileserver-gl are now rather large 24bit RGB/ 32bit RGBA.

The tiles can be minimised (usually up to half of the size) by quantization - and generating paletted 8bit PNG instead. It increase the speed of download and reduce the bandwidth - the raster maps are going to be faster, esp. on slower Internet connection.

Let's try to use this module (a small library with C++ dependency):
https://www.npmjs.com/package/node-pngquant-native

Alternative which would bring whole Mapnik as dependency would be:
https://www.npmjs.com/package/blend

Question ESRI Javascript API and WMTS

With tileserver-mapnik and tileserver-php WMTS is directly available as protocol, and we can use WMTS in ArcGIS Desktop and as WMTS Layer in a client web application based on ESRI Javascript API.

Does the tileserver-gl implementation offer WMTS support. And if not can i use the tileserver-gl as source in ESRI Javascript API (via VectorTileLayer or WebTiledLayer)?

A lot of 404 request

Hi.

I am running just an example tileserver-gl on my VirtualBox machine and I am trying to zoom in and out, and move the map and I am getting broken maps rendering wise, because a lot of pbf requests are 404. Is there any explanation why is this happening?

Staring server with:
docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl

And on my host machine I access:
http://192.168.96.10:8080/

This is how Bodensee in Swiss and Germany looks like:

bodensee_swiss

Best regards.

How to add new vectors

Hi,

I'm sorry that this is such a newbie question but there you go!

I've followed the instructions on this repo and the application is running nicely on localhost. However I had/have the same 404 issue described in #37. Following advice I have re-downloaded the vectors and also added some other ones.

I would like to show one of my own vectors which is relevant to the UK. I have downloaded the UK vector and have modified config.json:

"data": { "uk-vector": { "mbtiles": "zurich_switzerland.mbtiles", "mbtiles": "united_kingdom.mbtiles", "mbtiles": "switzerland.mbtiles", "mbtiles": "outdoor800.mbtiles" } }

I have also modified basic-v9.json:

"sources": { "mapbox": { "url": "mbtiles://switzerland.mbtiles", "type": "vector", "url": "mbtiles://outdoor800.mbtiles", "type": "vector", "url": "mbtiles://united_kingdom.mbtiles", "type": "vector", "url": "mbtiles://zurich_switzerland.mbtiles", "type": "vector" } },

however when I run the application I still get 404 errors such as:

GET /data/zurich-vector/6/33/21.pbf 404 3.944 ms - 19 GET /data/zurich-vector/6/32/22.pbf 404 3.709 ms - 19

which I guess means some config somewhere is still looking for the zurich vector even though it is not referenced in config.json or basic-v9.json.

Also when I try to zoom out to see the UK I see:

screen shot 2016-08-12 at 9 09 24 am

What am I missing?!

Some raster caching on disk

Would there be an interest with having some temporary caching on disk to avoid rendering the same tiles over?

Not sure what would the purge criteria be, perhaps solely on disk size. Every request touches the cached tile. If the size limit is met, start purging from the least recently access to most recently accessed.

Undesired image artifacts when rendering points

I noticed a small issue when rendering raster tiles from my vector data--sometimes the point symbols will be rendered as if they were being scaled down slightly or if its position was a fraction of a pixel.

iconraster

Both of those points are at the same zoom level and very close to one another, yet the left one renders perfectly and the other does not.

Is there a way to prevent this issue? I do not have this problem when using the vector versions of the map, it only shows up in the rasterized tiles. I assume mapbox-gl-native is being used to render the raster tiles? If so I can ask there, as I'm not entirely sure if this is a tileserver-gl or mapbox-gl-native issue.

Publish to npm

We forked tileserver-gl and removed the serverside rendering part so it is installable via npm.
Perhaps you can publish tileserver-gl to npm and make it work for any Node environment?
This makes it much more usable.

To make it installable from npm and that it can be used as binary you need to expose tileserver-gl as binary. Add entry like "bin": "bin/tileserver-vector.js" to package.json.

Polygon overlay in static maps

We need at some point a dynamically drawn polygons (or a highlighted polygon) on top of a JSON style - especially in the Static Maps API. To serve an image like:

https://maps.googleapis.com/maps/api/staticmap?size=235x190&scale=2&sensor=false&visual_refresh=true&path=color:0xff0000ff%7Cfillcolor:0xff000033%7Cweight:2%7C56.0070925897,-3.2043545251%7C56.0078494139,-3.1241867812%7C55.9629336300,-3.1228842812%7C55.9621780769,-3.2029591943%7C56.0070925897,-3.2043545251

Styles with multiple fonts fails

Docker console prints:

[Error: ENOENT: no such file or directory, open '/data/glyphs/Open Sans Italic,Open Sans Regular/0-255.pbf']
mbgl: { class: 'Style',
  severity: 'ERROR',
  text: 'Failed to load glyph range 0-255 for font stack Open Sans Italic,Open Sans Regular: ENOENT: no such file or directory, open \'/data/glyphs/Open Sans Italic,Open Sans Regular/0-255.pbf\'' }

No map (neither vector nor raster) is returned.

Responsive CSS for the web page

So it can be displayed on tablets and mobile phones as well (changeable width of the page and adjustment of padding - to fit different size of the screen).

The design itself is simple enough to easily support this - including the step to see the viewer in fullscreen without any controls and then return.

@daliborjanak would you like to contribute on this one?

See: ed0af94

SIGHUP for reloading configuration

It may be practical to gracefully reload config when the server receives a SIGHUP signal - so new maps and styles are used without downtime on the server caused by restarting.

Other vector tile providers than mbtiles

Currently the vector tiles are hardcoded to be served from an mbtiles file. It would be nice if you could provide your own Tilelive module to be a vector tile source.

Support V2 spec tiles

The OSM2VectorTiles project has upgraded recently to V2 specification of vector tile format - so all the vector tiles downloaded after OSM2VectorTiles milestone v2.2 are in this format.

We should upgrade the "MapBox GL Native" library too as there are reported rendering issues probably related to incompatibility of the old version of the rendering library with the new V2 spec of vector tiles. (to be reproduced first, before committing the upgraded version)

Running Docker on ARM

Hi guys,

I tried installing via docker, but discovered this error:

docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl
exec format error
Error response from daemon: Cannot start container 571b11b20b93fcee093edeab3704485d98e567fb1d23133039d53187682c68e5: [8] System error: exec format error

I believe this occurs because tileserver hasn't been packaged for ARM processors. Having a lot of issues installing via npm, so it'd be awesome if you could package it for the RaspberryPi!

Thanks for making something so awesome!

Config usability improvements

  • Handle absolute paths in options.paths (e.g. "root": "/data", "mbtiles": "/other/place")
  • Handle missing vector property

can not start container on 32b architecture

when trying to run the docker image I got the here below message ;

docker: Error response from daemon: rpc error: code = 2 desc = "oci runtime error: exec format error".

Does this image work with 32b CPU ?
My host is 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:41:41 UTC 2016 i686 i686 i686 GNU/Linux
Ubutun 16.04 LTS

URL error in style files when using tileserver behind a reverseproxy

Hi there :)
I try to use tileserver behind a reverse proxy (actually it is tileserver-gl-light but I think this is the same code).
On my server I start tileserver on http://127.0.0.1:8080 and then I use Apache as a reverse proxy to call tileserver from https://map.domain.tld. So far so good, HTTP calls are working, but when the style file is called (https://map.domain.tld/styles/bright-v9.json), then, inside I get something like this :
glyphs:"http://localhost:8080/fonts/{fontstack}/{range}.pbf" layers:[{id: "background", type: "background", paint: {background-color: "#f8f4f0"}, interactive: true},…] metadata:{mapbox:autocomposite: true, mapbox:type: "template",…} name:"Bright" sources:{mapbox: {url: "http://localhost:8080/data/osm2vectortiles.json", type: "vector"}} sprite:"http://localhost:8080/styles/bright-v9/sprite" version:8
As you see all urls are http://localhost:8080 ...
The problem came from /src/serve_style.js line 60 when you replace urls in the style file :
return url.replace('local://', req.protocol + '://' + req.headers.host + '/') + query;
Obviously req.protocol and req.headers.host are not the good ones. Is it possible to add somewhere in the config file the good url to use or to use an absolute URL without protocol and domain instead ?

Thanks a lot for this awesome project which I plans to use hugely !

Rendering issues

I have followed the instructions for running tileserver-gl from a Docker container. When I connect to port 80, I can see the the page listing the styles just fine. I am trying to server the united_states_of_america.mbtiles downloaded from OSM2VectorTiles. I have tried an older version of this file and a fresh download as well.

If I click on the link to view the vector tiles, everything works fine:

screen shot 2016-09-29 at 10 23 42 am

However, when I click on the link for raster tiles, I get random tiles from South America:

screen shot 2016-09-29 at 10 07 12 am

I have also tried downloading a city file and see the same results.

Pointing QGIS at the WMTS gives a different sampling of tiles from South America:

screen shot 2016-09-29 at 10 22 59 am

Any ideas of what is going wrong here? I would be happy to provide more information if needed.

Concatenate pbf tiles and TileJSONs

We need to be able to process following requests:

  • /vector/{mbtiles_name},{mbtiles_name}/{z}/{x}/{y}.pbf
    • the pbfs need to be concatenated (we already do this for fonts)
    • the issue is with concatenating pbfs from different zoom levels
      • e.g. /vector/a,b/8/19/21.pbf when b has maxzoom 6
        • combine a/8/19/21.pbf and part of b/6/4/5.pbf (the tile needs to be unpacked, scaled, repacked)
  • /vector/{mbtiles_name},{mbtiles_name}.json
    • solve name, maxzoom, bbox, center, ...

Use sample data when running in docker without config

If the docker container is run without any configuration present, try to download sample data from tileserver-gl-data repository (zip) and serve those data.

Also describe what is happening (to stdout) so the user understands where the data came from.

Dynamic layer loading

Is there any way to dynamically change any of the configuration (data & styles) without restarting the server?

Great work, by the way!

Performance testing

Performance testing of current tileserver-gl (rendering 960 various tiles):

Inside docker with mesa3d and xvfb:

  data: 2.1724632369999988 // mbtiles accessing [s]
  render: 16.036997651000004 // tile rendering (uses OpenGL) [s]
  compress: 9.118905018 // png compression [s]

Native - OpenGL can access GPU (underclocked -- core 300 MHz, memory 300MHz):

  data: 2.1002146649999998
  render: 13.908218127999989
  compress: 9.162028793000003

Native (GPU severly underclocked -- core 300 MHz, memory 150 MHz):

  data: 2.155217818000001
  render: 15.640598796999985
  compress: 8.87022230800001

Native (GPU -- core 900MHz, memory 900MHz):

  data: 2.0076603880000006
  render: 11.593615335
  compress: 8.727896114999984

Although the rendering process uses OpenGL and GPU, the performance seems to be okay even when running without HW acceleration.
Memory bandwidth is quite important since the rendered tiles need to be transferred from graphics memory to CPU RAM (and this operation is very cheap when using software rasterization).

Conclusion:
Running tileserver-gl on very low-end GPU probably wouldn't bring any (significant) performance gain over running inside docker container.

Code for performance testing is in performance branch.

Tileserver accepting random GET requests

I was doing some tests with tileserver-gl and noticed some strange GET requests. Currently the server is public facing for testing purposes though not actually being used anywhere. The final setup will involve having another public server reroute tile requests to the tile server on the LAN.

The request in question:
GET http://<random Chinese website here>.com/ 200 113.811 ms - 4686

Is this normal behavior? Shouldn't it reject this request outright as not valid, since it isn't actually requesting a tile? Is there a way to auto-reject such requests, or is this something I will just need to handle on a proper server and keep the tile server private?

My concern is this could be used in some malicious fashion, but my security expertise is lacking. I'm not sure if that line means the tileserver is going out and grabbing that website or if it is just ignoring it and sending back a 200 OK message. Maybe it is completely benign and I'm just being paranoid--can anyone ease my mind a bit?

Cannot install on Node 6.2 Mac OSX 10.9.5

The npm install process seems to be stopping at the mason compile step:

/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/node_modules/.bin/node-pre-gyp configure --clang -- -I./build/node-osx-x86_64/config.gypi -Dcoverage=0 -Dcxx_host= -Goutput_dir=. --depth=. --generator-output=./build/node-osx-x86_64
-Dlibuv_cflags= -Dlibuv_ldflags= -Dlibuv_static_libs=
/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/node_modules/.bin/node-pre-gyp build --clang
ACTION binding_gyp_core_target_Build_Version_Header Release/obj/gen/include/mbgl/util/version.hpp
RULE binding_gyp_core_target_Build_Shaders_0 Release/obj/gen/include/mbgl/shader/box.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_1 Release/obj/gen/include/mbgl/shader/box.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_2 Release/obj/gen/include/mbgl/shader/circle.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_3 Release/obj/gen/include/mbgl/shader/circle.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_4 Release/obj/gen/include/mbgl/shader/dot.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_5 Release/obj/gen/include/mbgl/shader/dot.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_6 Release/obj/gen/include/mbgl/shader/icon.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_7 Release/obj/gen/include/mbgl/shader/icon.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_8 Release/obj/gen/include/mbgl/shader/line.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_9 Release/obj/gen/include/mbgl/shader/line.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_10 Release/obj/gen/include/mbgl/shader/linepattern.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_11 Release/obj/gen/include/mbgl/shader/linepattern.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_12 Release/obj/gen/include/mbgl/shader/linesdf.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_13 Release/obj/gen/include/mbgl/shader/linesdf.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_14 Release/obj/gen/include/mbgl/shader/outline.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_15 Release/obj/gen/include/mbgl/shader/outline.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_16 Release/obj/gen/include/mbgl/shader/pattern.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_17 Release/obj/gen/include/mbgl/shader/pattern.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_18 Release/obj/gen/include/mbgl/shader/plain.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_19 Release/obj/gen/include/mbgl/shader/plain.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_20 Release/obj/gen/include/mbgl/shader/raster.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_21 Release/obj/gen/include/mbgl/shader/raster.vertex.hpp
RULE binding_gyp_core_target_Build_Shaders_22 Release/obj/gen/include/mbgl/shader/sdf.fragment.hpp
RULE binding_gyp_core_target_Build_Shaders_23 Release/obj/gen/include/mbgl/shader/sdf.vertex.hpp
COPY Release/ca-bundle.crt
TOUCH Release/obj.target/copy_certificate_bundle.stamp
CXX(target) Release/obj.target/core/src/clipper/clipper.o
CXX(target) Release/obj.target/core/src/csscolorparser/csscolorparser.o
CXX(target) Release/obj.target/core/src/mbgl/annotation/annotation_manager.o
CXX(target) Release/obj.target/core/src/mbgl/annotation/annotation_tile.o
error: invalid value 'c++14' in '-std=c++14'
error: invalid value 'c++14' in '-std=c++14'
error: invalid value 'c++14' in '-std=c++14'
make[2]: *** [Release/obj.target/core/src/csscolorparser/csscolorparser.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Release/obj.target/core/src/mbgl/annotation/annotation_manager.o] Error 1
make[2]: *** [Release/obj.target/core/src/clipper/clipper.o] Error 1
error: invalid value 'c++14' in '-std=c++14'
make[2]: *** [Release/obj.target/core/src/mbgl/annotation/annotation_tile.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--clang" "--module=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib/mapbox-gl-native.node" "--module_name=mapbox-gl-native" "--module_path=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib"
gyp ERR! cwd /Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --clang --module=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib/mapbox-gl-native.node --module_name=mapbox-gl-native --module_path=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Darwin 13.4.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/node_modules/.bin/node-pre-gyp" "build" "--clang"
node-pre-gyp ERR! cwd /Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native
node-pre-gyp ERR! node -v v6.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --clang --module=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib/mapbox-gl-native.node --module_name=mapbox-gl-native --module_path=/Users/ablopez/Desktop/tileserver-gl/node_modules/mapbox-gl-native/lib' (1)
make[1]: *** [Makefile/node] Error 1
make: *** [node] Error 2
npm WARN [email protected] No license field.
npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build=false || make node
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build=false || make node'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mapbox-gl-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build=false || make node
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mapbox-gl-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mapbox-gl-native
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/ablopez/Desktop/tileserver-gl/npm-debug.log

Attached is the npm-debug.log

npm-debug.log.txt

Auth and Referer Header check

Hi.

Is there a way to set some basic auth or referer check on server side, so the server would prove referer before the tiles would be delievered. I have used before https://github.com/klokantech/tileserver-mapnik, but I had to checkout the whole project and then customize the server.js.

Need: we want to set our server live and we do not want everyone to be able to render maps from our server.

If there is nothing like this at the moment, would it be hard to set some kind of config, or throught Dockerfile somehow, that would enable somekind of authentication?

Best regards.

Simple launch support for raster mbtiles

The simple use with passing an mbtiles file as an argument does not support raster tiles created by MapTiler right now.

Command like:
tileserver-gl grandcanyon.mbtiles
complain about the format not beeing pbf

Error while npm installing (node v4.5, npm 3.10.6)

Hey hey and thanks for this wonderful project. While trying to install the npm module, i constantly run into following error:

/Users/imac24/.nvm/versions/node/v4.5.0/lib
└── (empty)

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/imac24/.nvm/versions/node/v4.5.0/bin/node" "/Users/imac24/.nvm/versions/node/v4.5.0/bin/npm" "install" "-g" "tileserver-gl"
npm ERR! node v4.5.0
npm ERR! npm  v3.10.6
npm ERR! path /Users/imac24/.nvm/versions/node/v4.5.0/lib/node_modules/.staging/abbrev-bebc58f6
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/Users/imac24/.nvm/versions/node/v4.5.0/lib/node_modules/.staging/abbrev-bebc58f6' -> '/Users/imac24/.nvm/versions/node/v4.5.0/lib/node_modules/tileserver-gl/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/imac24/.nvm/versions/node/v4.5.0/lib/node_modules/.staging/abbrev-bebc58f6' -> '/Users/imac24/.nvm/versions/node/v4.5.0/lib/node_modules/tileserver-gl/node_modules/abbrev'

Neither can i find any dependency to abbrev in the dep tree, nor does it make issues when i install it separately.
So I'm asking you if you might know this behavior and a possible fix. Cheers and thanks in advance!

WMTS link for raster tiles

The "WMTS" link for raster tiles is missing.

Either we link from JavaScript the wmts.maptiler.com service which turns the TileJSON to WMTS GetCapabilities XML, or we implement the correct XML serving on the server side directly.

Error message for /data/config.json not found

The error message may be be more user-friendly (now it is an exception with stack trace).

Maybe with a suggestion for getting the sample data?

Related to release of version 1.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.