AnsweredAssumed Answered

Is it possible to render mapbox vector tiles (pbf) from a custom tile-server

Question asked by eivind.ronnevik on Oct 10, 2016
Latest reply on Feb 23, 2018 by joshuagage

Hi,

 

I have been testing the VectorTileLayer, both in 3.18 and 4.1 version. However it seems that the implementation of these layers (or the vectorTileLayerLoader.js to be more explicit) constrains the use of the VectorTileLayer to either
a) A Mapbox service - providing the ACCESS_TOKEN
b) An ESRI vector tile service, either using the URL directly or the URL to a Style json


I have made a local/custom tileserver using node.js and some of the javascript libraries from mapbox, and I would like to know if there is a way to render the vector tiles coming from this local server?


A URL like "http:\\somehost\layerName\{level}\{col}\{row}.mvt" (similar to the concept of WebTiledLayer) is what I'm after, but this is not supported by the current implementation I believe (at least I have not found a way to get it working).


I have also tried to extend the VectorTileLayer object and override the getTileUrl method, but this has not worked either.

 

getTileUrl: function(level, row, col) {
              return url+level+"/"+col+"/"+row+".mvt";
}

 

Does anyone know if it is possible to get this to work?


Kind regards,
Eivind

Outcomes