Deck.gl: mapbox tile as a datasource

Created on 1 Sep 2017  路  5Comments  路  Source: visgl/deck.gl

Is it possible to use data from mapbox tiles directly as a datasource for a component layer?

This would be really nice for things like buildings or enterprise boundaries that are already part of the tiles. e.g., for buildings, from the mapbox docs you can simply reference the building source layer:

map.addLayer({
  'id': '3d-buildings',
  'source': 'composite',
  'source-layer': 'building',
  'filter': ['==', 'extrude', 'true'],
  'type': 'fill-extrusion',
  'minzoom': 15,
  'paint': {
    'fill-extrusion-color': '#aaa',
    'fill-extrusion-height': {
        'type': 'identity',
        'property': 'height'
    },
    'fill-extrusion-base': {
        'type': 'identity',
        'property': 'min_height'
    },
    'fill-extrusion-opacity': .6
  }
});

Most helpful comment

Any updates on this ?

I'm trying to understand if deck.gl can be used as a full replacement of mapbox-gl capabilities, and thus if we can show vector tiles on deck.gl

All 5 comments

@williaster Creating a layer that reads map tiles is an interesting idea, but there hasn't been any work on it.

You can of course set such extruded map styles on the underlying map (e.g. layering deck.gl on top of react-map-gl), but mapbox and deck.gl will use different Z-buffers so it doesn't work well for extruded map layers.

Any updates on this ?

I'm trying to understand if deck.gl can be used as a full replacement of mapbox-gl capabilities, and thus if we can show vector tiles on deck.gl

@cyrilchapon , @williaster

Not sure if either of you are still thinking about this, but for anyone else who ends up here looking for an answer to this question:

It looks like there's an experiment TileLayer available
https://github.com/uber/deck.gl/blob/master/modules/experimental-layers/src/tile-layer/tile-layer.md

I haven't tried it yet, but it looks like it fits pretty much perfectly with what I need. Hope it helps

@williaster Hi, deck.gl support add mapbox layer now.

3316 ,I tried . but have some error.

could you help me take a look ?

@williaster #3329 ,not #3316

Was this page helpful?
0 / 5 - 0 ratings