Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom colormaps #200

Closed
banesullivan opened this issue Feb 10, 2024 · 0 comments · Fixed by #223
Closed

Support custom colormaps #200

banesullivan opened this issue Feb 10, 2024 · 0 comments · Fixed by #223

Comments

@banesullivan
Copy link
Owner

Originally reported in opengeos/leafmap#673 (reply in thread)

This was supported in previous versions of localtileserver but was removed in the recent transition to rio-tiler

Here's psuedocode for what usage might look like:

cmap1 = ListedColormap(['red','blue'],name='test_1')
cmap2 = ListedColormap(['blue','green'],name='test_2')
cmap3 = ListedColormap(['green','red'],name='test_3')

layer1 = get_leaflet_tile_layer(client, indexes=[2,1,3], cmap=[cmap2,cmap1,cmap3])

layer2 = get_leaflet_tile_layer(client, indexes=[2], cmap=cmap2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant