52

As pointed out by @Greg, instead of TileStream (my first attempt) you should use Tilelive to host your own vector tiles. Tilelive isn't a server itself but a backend framework that deals with tiles in different formats from different sources. But it's based on Node.js so you can turn it into a server in a pretty straight-forward way. To read tiles from a ....


26

The hosting of the vector tiles on your own is relatively straightforward. The MBTiles contains .pbf files which must be exposed to the web. That's it. Probably easiest is to use a simple open-source server such as TileServer-PHP and put the MBTiles file to the same folder as the project files. The TileServer do all the hosting config for you (CORS, ...


12

Not to toot my own horn, but https://github.com/spatialdev/PGRestAPI is a project I've been working on that hosts .mbtiles vector tile exports from Mapbox Studio. Still needs lots of documentation, but basically, drop your .mbtiles files into /data/pbf_mbtiles and restart the node app. It will read thru that folder and offer endpoints for your vector tiles....


10

Thanks for the great question. I did not know that they had finally released a stable version of the vector tiles. Moreover, you may have to work with this answer as it is a source of ideas to your "any ideas?" question. I do not have a running studio yet. I think one of the problems that you are running into is that you are using a tilejson file. You ...


10

For just drawing vectors, Leaflet or OpenLayers will do just fine. Nothing new there. For vector tiled maps (i.e different resolutions/levels of detail at different zoom levels), TileStache is a simple and good server. I have been using with lots of experiments with Polymaps (AFAIK, the only general-purpose working js tiled vector viewer). Some people have ...


10

Update: since posting this, Mapbox released Mapbox GL JS, which does WebGL-based vector basemap rendering in browser. At this point, there's no established option. The only fully-vector in-production map out there is Google's MapsGL, and that's very limited due to browser support & performance. The closest you'll get with open source at the moment is ...


10

In Leaflet 0.7x, this is made easy with the Leaflet.MapboxVectorTile plugin. You just need to specify the URL pattern in the url configuration option. The plugin documentation details the other configuration options that are available. To add the Mapillary data, you would use it like this: var config = { url: "https://d2munx5tg0hw47.cloudfront.net/tiles/{...


10

POSTGIS now supports outputting vector tiles as endpoint to a Query. https://postgis.net/docs/ST_AsMVT.html I honestly don't recommend this approach because currently that's just geometry and no attributes. You can also pair POSTGIS with GeoServer and GeoWebCache to produce vector tiles but also don't recommend that. But probably your best bet now is ...


8

I could successfully feed Mapbox SDK with non-mapbox (wikimedia) datasource without API key, which likely means there is no restriction for it. Also in code comments (logoView on iOS) they mention that you only need to display the Mapbox watermark if you use mapbox-hosted maps, you can safely hide it otherwise. Attaching the Mapbox GL style json file for ...


8

No, the data is absolutely not secure by virtue of being encoded as vector tiles. Vector tiles are typically PBF data (protocol buffers) in the Mapbox Vector Tile (MVT) specification. (Media type: application/vnd.mapbox-vector-tile.) It is a well-known binary format. The reason your map client knows how to display the data encoded in your vector tile is ...


7

Absolutely Matt. Using vectors as the datasource for maps is ideal for high resolution printed output and MapBox vector tiles work well to distribute large data like OSM efficiently. I think the problem in getting something like this working is purely on a software level - you need the capability to mosaic tiles together, apply styles to them, and then ...


7

The so-called "multiresponse GeoJSON object" is not valid GeoJSON. Split the data before instantiating the Leaflet GeoJSON layers, e.g.: // Assuming that you've already fetched the data off the network var data = { roads: { type: "FeatureCollection", features: ..... }, pois: { type: "FeatureCollection", features: ..... }, ....... };...


6

If I understand your question correctly then both OpenLayers and Leaflet will load/show vector data. For example http://leafletjs.com/examples/geojson/ this loads a GeoJSON file onto the leaflet map which uses OSM via CloudMade in the background. OpenLayers probably supports more different types of vector formats, like KML http://dev.openlayers.org/...


6

I think I'd probably look to download the data into Postgres using ogr2ogr then look at TileStashe for serving the vector tiles. Docs for ogr2ogr WFS driver: http://www.gdal.org/drv_wfs.html @underdark wrote about using ogr2ogr: http://anitagraser.com/2012/09/26/wfs-to-postgis-in-3-steps/ There are some pointers for configuring TileStashe here: https://...


6

As stated by other people, mbtiles were just raster format stored in a sqlite database using a particular specification. Nowadays, it's seems that it's reuse to store vector tiles using the same scheme. For vector tiles generation to mapbox vector tile format, you have choices listed at https://github.com/mapbox/awesome-vector-tiles#servers You can also ...


6

I am now using Tangram to display my tiles, Tangram allows me to parse the composite response with no issues at all, it can identify the layers with just the name I supply, and it has good documentation and support.


6

I can't speak for Mapbox, but generally their approach is their software is free and open source, and their platform costs money to use. You can host your own data, styles etc on your own servers for free. Just remember that these things would use their platform, and hence cost money: Using Mapbox Streets vector tiles Using APIs such as routing or Surface. ...


6

I have a similar problem. I want use openmaptiles + mapbox-gl-js for free without licence key. The licenceconditionen on mapbox page is not very clear. So I asked mapbox directly. I asked: I want ask you, in what architecture we can use it for free. I’m not sure but I think, if we host self the tilesserver, then we can use Mapbox GL JS for free. It’s ...


6

I kept on reading and I guess I found the answer myself. I won't delete the answer, maybe someone else will bump into the same problem. mapbox-vector-tile is the library I use and its documentation explains how they transformation are done: https://github.com/tilezen/mapbox-vector-tile#coordinate-transformations-for-encoding


5

The idea to transfer vector data instead of images and render it on the client side is not new. There are already a lot of tools/projects doing that. See for example this plugin of leaflet, polymap, and also the cartagen project. OpenLayer developer are trying to introduce it in the (long-awaited) version 3.0. Each of these initiatives use their own vector ...


5

That gist is using GeoJSON designed for polymaps. While polymaps handled it correctly (see the original example), this Leaflet code (not Leaflet itself, the GeoJSON tiled layer connector) isn't quite complete. So, part of this is that it's not quite finished. But the more-big part is that things being 'jerky' in IE is the norm - IE is a very bad web browser,...


5

I haven't tried @walkermatt's approach with TileStache, but Chubbs SpatialServer (aka PGRestAPI) was very easy to deploy. WFS to PostGIS Assuming you have PostGIS installed and a GIS-enabled database, this is completely trivial: ogr2ogr -f PostgreSQL PG:"user=ubuntu password=... dbname=gis" \ "WFS:http://example.org/ows?version=2.0.0&SERVICE=WFS&...


5

I got the tiles to overlay correctly. The problem was in the re-projection done by both ArcMap and QGIS. When I was checking the reprojected shapefiles in ArcMap and QGIS, they were overlaying correctly and had the correct SRIDs. So I imported the shapefiles in WGS84 in PostgreSQL using the SRID4326 with shp2pgsql then used ST_Transfrom to reproject the ...


5

So I am able to get all the layers in a single layer, a "composite" by using the MultiProvider provider in the class and just passing it the layers I want in the composite as the arguments. It results in a single JSON file that contains all of my layers. This is the layer I added in the cfg "composite": { "allowed origin":"*", ...


5

I would say that for zoom greater than 15, if you split your area of interest into smaller areas(Bounding box), you will be able to cache them in much less time by running multiple processes on a single machine. For example, you are running zoom 16 (having 50,000,00 tiles) on a machine and according to your average tile-caching speed, this process will ...


5

mapbox-tile-copy will convert shapefiles (and a bunch of other formats) to Mapbox Vector Tiles on Amazon S3. There is also tippecanoe to create an mbtiles of vector tiles from your shapefile.


5

You could try looking int this OS option, Skeletron, it: generalizes collections of lines to a specific spherical mercator zoom level and pixel precision, using a polygon buffer and voronoi diagram It is based off of a 1996 paper by Alnoor Ladak and Roberto B. Martinez, "Automated Derivation of High Accuracy Road Centrelines Thiessen Polygons ...


5

I ended up using those two packages : https://github.com/mapbox/geojson-vt (for getting a tile from geojson) and https://github.com/mapbox/vt-pbf (for transforming this tile into pbf) I made a quick module from that (maybe not ready for production use, but hey, it is a good start) : https://github.com/philippeauriach/vector-tiles-generator


5

As the documentation makes clear the Vector tiles module is an output format not a datasource, so it is currently impossible for GeoServer to read in vector tiles. If you would like to add this functionality to GeoTools (Datasources are implemented in GeoTools): https://github.com/geotools/geotools/blob/master/CONTRIBUTING.md If you want to contribute ...


4

We started a page to collect links and information about vector tiles in the OpenStreetMap Wiki (work in progress): http://wiki.openstreetmap.org/wiki/Vector_tiles


Only top voted, non community-wiki answers of a minimum length are eligible