Source code for bokeh.models.renderers.tile_renderer
#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''''''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Bokeh importsfrom...core.propertiesimport(Bool,Float,Instance,InstanceDefault,Override,)from..tilesimportTileSource,WMTSTileSourcefrom.rendererimportRenderer#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=("TileRenderer",)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------
[docs]classTileRenderer(Renderer):''' '''# explicit __init__ to support Init signaturesdef__init__(self,*args,**kwargs)->None:super().__init__(*args,**kwargs)tile_source=Instance(TileSource,default=InstanceDefault(WMTSTileSource),help=""" Local data source to use when rendering glyphs on the plot. """)alpha=Float(1.0,help=""" tile opacity 0.0 - 1.0 """)smoothing=Bool(default=True,help=""" Enable image smoothing for the rendered tiles. """)render_parents=Bool(default=True,help=""" Flag enable/disable drawing of parent tiles while waiting for new tiles to arrive. Default value is True. """)level=Override(default="image")
#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Private API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Code#-----------------------------------------------------------------------------