mobile-sdk icon indicating copy to clipboard operation
mobile-sdk copied to clipboard

allow to draw hillshade in between a vectortile layer.

Open farfromrefug opened this issue 5 years ago • 2 comments

Might seem crazy but in fact it think you already implemented most of it. The idea behind all that is this. When you draw hillshades you actualy want them to be drawn above the "landcover/landuse" but under the roads and everything else. This is what you see on web maps like mapbox. Screenshot 2020-12-04 at 14 35 18

Right now this is not possible because you need 2 layers. One for the vector tiles and one for the hillshade. I am not sure how you would write it on the client side but i think everything is there to do it. CartoVectorTileDecoder can select and hide specific layers. First we would need to get that into MBVectorTileDecoder. With this in a sense you could insert a tile bitmap generated by the hillshadeTileLayer insidetileLayer Then that bitmap could be correctly be drawn by the GLTileRenderer here.

This is my understanding of it. I would like to have your opinion on this.

farfromrefug avatar Dec 04 '20 13:12 farfromrefug

This definitely makes sense. We have though about this before and at the high level we would implement it a bit differently:

  1. Instead of flat layer list there would be a tree of layers. Each layer could contain any number of sublayers.
  2. VectorTileLayer would contain 'light weight' VectorTileSubLayer class instances that are added automatically based on the style.

Implementing this would require some non trivial refactoring though, so we have not added it to our roadmap.

mtehver avatar Dec 08 '20 13:12 mtehver

@mtehver i want to add something to this. Having something like this would also (i think) allow merging vector layers with one big difference. Right now if you use MergedMBVTTileDataSource then all your sources must have the same max zoom or overzoom will not work. Having this would allow (i think) to have different maxzoom without losing overzoom. This could make a big difference because for example for contours it could remove the need for zoom 14 and thus drastically reduce source size.

farfromrefug avatar Jun 06 '22 07:06 farfromrefug