Hello,
Does anyone know how to display vector tiles generated from a shapefile in Cesium?
I tiled a shapefile with TileMill (https://www.mapbox.com/timemill). Then, I unpacked the resulting .mbtiles file with mbutil (https://github.com/mapbox/mbutil, https://www.e-education.psu.edu/geog585/node/711). The .mbtiles unpacks into directories 7/, 8/, ... , 18/ with png's and a metadata.json.
Tilestream can display the vector tiles (https://github.com/mapbox/tilestream). In a terminal, cd into the tilestream folder and run this command: node --harmony index.js --tiles='[path and directory that contains your unpacked .mbtiles]' &
A webpage http://localhost:8888/ displays zoomable vector tiles.
This works on both Windows 7 and Ubuntu 14.04.
In my Cesium app, I've tried several providers and several url variations. However, I am not able to display shapefile generated vector tiles draped over my Cesium terrain map.
var shorelines = layers.addImageryProvider(
new Cesium.OpenStreetMapImageryProvider({
url: 'http://localhost:8888',
rectangle: new Cesium.Rectangle.fromDegrees (
-89.533156,29.58726,-84.1728,30.5219497),
fileExtension: 'png',
minimumLevel: 7,
maximumLevel: 18
})
);
I tried various providers:
WebMapTileServiceImageryProvider,
TileMapServiceImageryProvider (with the directories and metadata files for it),
OpenStreetMapImageryProvider.
I tried different url’s to the tiles:
url: ‘http://ipaddress:8888/v2/firstTileMill_a2650c/{z}/{x}/{y}.png’,
url: ‘ipaddress:8888/map/firstTileMill_a2650c’,
url: ‘http://ipaddress/#!/map/firstTileMill_a2650c’,.
Please help if you are able to get vector tiles to display in Cesium. Thanks!
Susan Renee