Closed spatialthoughts closed 5 months ago
Try this:
import leafmap.deckgl as leafmap
from lonboard import basemap
m = leafmap.Map(height=600)
m.add_basemap("CartoDB.DarkMatterNoLabels")
m
This gives AttributeError: 'Map' object has no attribute 'add_basemap' error
Reproducible example on Colab https://colab.research.google.com/drive/1TEG2_7WEUwkcfoKb4zxx2NE5P8OYdfuz?usp=sharing
Thank you for report. It has been fixed in #799. Please update it to v0.35.1
import leafmap.deckgl as leafmap
from lonboard import basemap
m = leafmap.Map(height=600, basemap_style=basemap.CartoBasemap.DarkMatterNoLabels)
m
Incredible! Less than 2 hours from bug report to fix to release. Upgraded and uses it to create the visualization I was after.
My pleasure. That was an easy fix. I should improve the lonboard module when I have time. There is still a lot of room for improvement.
Environment Information
Description
This results in an error TypeError: ViewState.new() got an unexpected keyword argument 'basemap_style'.
Diving into the code, this seems to be because the kwargs are passed on to view_state and not lonboard.Map