vega / altair_tiles

https://vega.github.io/altair_tiles/
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

Create basemap chart without geoshape chart #1

Closed binste closed 1 year ago

binste commented 1 year ago

add_basemap requires an existing Altair chart with a geoshape mark. Would be nice to be able to create a standalone chart with only a basemap.

An extra feature would be if that basemap chart can be created first and then another geoshape mark chart added with the usual basemap_chart + geoshape_chart syntax.

binste commented 1 year ago

Use case from @mattijn which would benefit from either having a way to define a zorder or create single charts and then layer them in any custom order.

Such as flooding extents on top of basemaps in combination with polygon outlining, or a nautical map like https://www.openseamap.org/ which draws transparent tiles with only the navigational aid symbols.

mattijn commented 1 year ago

Awesome to see this getting shape👍👍.

Reconsidering my suggestion of using zorder, probably better not use that name as it is not used anywhere else in Altair. Indeed better to support layering so the user can decide the order when layering the tile-layers together.

binste commented 1 year ago

Agree. Implemented a first version of a create_tiles_chart function in #7 which returns a layered chart with an empty mark_geoshape chart + a tiles image chart. See the comments in the code on why it did not work to just have the image chart as we need a projection in the compiled Vega code and for this it somehow needs a geoshape layer.