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

How to prevent flicker on geoviews WMTS? or block events until WMTS has been loaded? #510

Closed
andhuang-CLGX opened this issue Jul 21, 2021 · 1 comment

Comments

@andhuang-CLGX
Copy link

I think it's because WMTS is a non-blocking process so the DynamicMap updates before the data has been retrieved which causes a second of an empty canvas.

import geoviews as gv
gv.extension('bokeh')

def plot_tiles(value):
    return gv.WMTS(value)

options = [
    "https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/analysis_meteohydro_sfc_rtma_time/MapServer/export?transparent=true&format=png8&layers=show%3A7&bboxSR=3857&imageSR=3857&size=256,256&f=image&time=1626901200000&bbox={XMIN},{YMIN},{XMAX},{YMAX}",
    "https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/analysis_meteohydro_sfc_qpe_time/MapServer/export?transparent=true&format=png8&layers=show%3A7&bboxSR=3857&imageSR=3857&size=256,256&f=image&time=1626901201000&bbox={XMIN},{YMIN},{XMAX},{YMAX}"
]
select = pn.widgets.Select(options=options)
tiles_dmap = gv.DynamicMap(plot_tiles, streams=[select.param.value])
pn.Column(select, tiles_dmap)
@ahuang11
Copy link
Collaborator

Hack shown here:
#698

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

No branches or pull requests

2 participants