-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comparative maps #15
Comments
I first explored the possibility of a split panel slider with geemap but it turned out it's only compatible with a pre-hardcoded list of basemaps and doesn't hook new raster layers. There may be a way but so far it's too time consuming trying to figure it out the geemap way. Opted for folium's DualMap plugin, I managed to setup a dual map as the main map, since the whole gist of this project is to be able to compare bewteen the NDVI of the same geographic area on two different periods. So far I was able to figure out how to add which layer to which side of the map, it was a bit tricky but it worked for the prototyping phase, here's a preview: I still have to properly configure the map and attach the appropriate layers and basemaps to the right side of the map. |
Layers order bugIt seems that DualMap has a weird bug where the order of layers is not the same on both maps when adding m = folium.plugins.DualMap(location=[36.40, 2.80], tiles='Open Street Map', zoom_start=10, control_scale=True)
### BASEMAPS START
## Primary basemaps
# CartoDB Dark Matter basemap
b1 = folium.TileLayer('cartodbdark_matter', name='Dark Matter Basemap')
b1.add_to(m)
## WMS tiles basemaps
# OSM CyclOSM basemap
b2 = WmsTileLayer(
url=('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png'),
layers=None,
name='Topography Basemap', # layer name to display on layer panel
attr='Topography Map',
show=False
)
b2.add_to(m)
# ##### ESRI sattelite imagery service
b3 = WmsTileLayer(
url=('http://services.arcgisonline.com/arcgis/rest/services/World_Imagery' + '/MapServer/tile/{z}/{y}/{x}'),
layers=None,
name='ESRI Sattelite Imagery',
attr='ESRI World Imagery',
show=False
)
b3.add_to(m)
# ##### Google sattelite imagery service
b4 = WmsTileLayer(
url=('https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}'),
layers=None,
name='Google Sattelite Imagery',
attr='Google',
show=False
)
b4.add_to(m) |
cyclosm wms tile used as topography map doesn't render tiles beyond zoom level 9 in dual map mode. |
This is a nightmare.
Gonna switch back to single map for now untill I figure out a fix with folium-streamlit. |
Find a way to create comparative maps where each displays the NDVI from a date period specified by user input. Explore;
[ ] Map sliderThe text was updated successfully, but these errors were encountered: