geemap/geemap.py
def to_streamlit(
        self, width=700, height=500, responsive=True, scrolling=False, **kwargs
    ):
        """Renders map figure in a Streamlit app.

        Args:
            width (int, optional): Width of the map. Defaults to 700.
            height (int, optional): Height of the map. Defaults to 500.
            responsive (bool, optional): Whether to make the map responsive. Defaults to True.
            scrolling (bool, optional): If True, show a scrollbar when the content is larger than the iframe. Otherwise, do not show a scrollbar. Defaults to False.

        Returns:
            streamlit.components: components.html object.
        """

        try:
            import streamlit as st
            import streamlit.components.v1 as components

            if responsive:
                make_map_responsive = """
                <style>
                [title~="st.iframe"] { width: 100%}
                </style>
                """
                st.markdown(make_map_responsive, unsafe_allow_html=True)
            return components.html(
                self.to_html(), width=width, height=height, scrolling=scrolling
            )

        except Exception as e:
            raise Exception(e)
Renders map figure in a Streamlit app.

        Args:
            width (int, optional): Width of the map. Defaults to 700.
            height (int, optional): Height of the map. Defaults to 500.
            responsive (bool, optional): Whether to make the map responsive. Defaults to True.
            scrolling (bool, optional): If True, show a scrollbar when the content is larger than the iframe. Otherwise, do not show a scrollbar. Defaults to False.

        Returns:
            streamlit.components: components.html object.
        
Renders map figure in a Streamlit app.
Renders map figure in a Streamlit app .
def to_streamlit(
        self, width=700, height=500, responsive=True, scrolling=False, **kwargs
    ):
        try:
            import streamlit as st
            import streamlit.components.v1 as components
            if responsive:
                make_map_responsive = """
                <style>
                [title~="st.iframe"] { width: 100%}
                </style>
                """
                st.markdown(make_map_responsive, unsafe_allow_html=True)
            return components.html(
                self.to_html(), width=width, height=height, scrolling=scrolling
            )
        except Exception as e:
            raise Exception(e)
def to_streamlit ( self , width = 700 , height = 500 , responsive = True , scrolling = False , ** kwargs ) : try : import streamlit as st import streamlit . components . v1 as components if responsive : make_map_responsive = """
                <style>
                [title~="st.iframe"] { width: 100%}
                </style>
                """ st . markdown ( make_map_responsive , unsafe_allow_html = True ) return components . html ( self . to_html ( ) , width = width , height = height , scrolling = scrolling ) except Exception as e : raise Exception ( e )
Renders map figure in a Streamlit app.
Renders map figure in a Streamlit app .
"""Renders map figure in a Streamlit app.

        Args:
            width (int, optional): Width of the map. Defaults to 700.
            height (int, optional): Height of the map. Defaults to 500.
            responsive (bool, optional): Whether to make the map responsive. Defaults to True.
            scrolling (bool, optional): If True, show a scrollbar when the content is larger than the iframe. Otherwise, do not show a scrollbar. Defaults to False.

        Returns:
            streamlit.components: components.html object.
        """
None
streamlit.components
self
width
Width of the map. Defaults to 700.
Width of the map . Defaults to 700 .
700
height
Height of the map. Defaults to 500.
Height of the map . Defaults to 500 .
500
responsive
Whether to make the map responsive. Defaults to True.
Whether to make the map responsive . Defaults to True .
True
scrolling
If True, show a scrollbar when the content is larger than the iframe. Otherwise, do not show a scrollbar. Defaults to False.
If True show a scrollbar when the content is larger than the iframe . Otherwise do not show a scrollbar . Defaults to False .
False