tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.21k stars 290 forks source link

Check handling of nested rasters datasource #296

Open tallytalwar opened 8 years ago

tallytalwar commented 8 years ago

Example Style sheet:

sources:
    stamen-watercolor:
        type: Raster
        url: http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg
    stamen-toner:
        type: Raster
        url: http://tile.stamen.com/toner/{z}/{x}/{y}.png
        rasters: [stamen-watercolor] # add watercolor sampler alongside toner
    test-source:
        type: Raster
        url: blah
        rasters: [stamen-toner]

This should be same as doing:

sources:
    stamen-watercolor:
        type: Raster
        url: http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg
    stamen-toner:
        type: Raster
        url: http://tile.stamen.com/toner/{z}/{x}/{y}.png
    test-source:
        type: Raster
        url: blah
        rasters: [stamen-toner, stamen-watercolor]
tallytalwar commented 8 years ago

Just a note, I removed recursive handling of raster references in sources from tangram-es implementation. This was also overly complicating the tile management logic. Plus the same behavior can be achieved with other simpler means.