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__ import annotations
import logging # isort:skip
log = logging.getLogger(__name__)
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# Standard library imports
from typing import Any
# Bokeh imports
from ...core.properties import (
    Bool,
    Float,
    Instance,
    InstanceDefault,
    Override,
)
from ..tiles import TileSource, WMTSTileSource
from .renderer import Renderer
#-----------------------------------------------------------------------------
# Globals and constants
#-----------------------------------------------------------------------------
__all__ = (
    "TileRenderer",
)
#-----------------------------------------------------------------------------
# General API
#-----------------------------------------------------------------------------
[docs]
class TileRenderer(Renderer):
    '''
    '''
    # explicit __init__ to support Init signatures
    def __init__(self, *args: Any, **kwargs: Any) -> 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
#-----------------------------------------------------------------------------