Adds split map. Args: left_layer (str, optional): The left tile layer. Can be a local file path, HTTP URL, or a basemap name. Defaults to 'TERRAIN'. right_layer (str, optional): The right tile layer. Can be a local file path, HTTP URL, or a basemap name. Defaults to
(
self,
left_layer: Optional[str] = "TERRAIN",
right_layer: Optional[str] = "OpenTopoMap",
left_args: Optional[dict] = {},
right_args: Optional[dict] = {},
left_array_args: Optional[dict] = {},
right_array_args: Optional[dict] = {},
zoom_control: Optional[bool] = True,
fullscreen_control: Optional[bool] = True,
layer_control: Optional[bool] = True,
add_close_button: Optional[bool] = False,
left_label: Optional[str] = None,
right_label: Optional[str] = None,
left_position: Optional[str] = "bottomleft",
right_position: Optional[str] = "bottomright",
widget_layout: Optional[dict] = None,
draggable: Optional[bool] = True,
)
| 1913 | self.add_gdf(markers, **kwargs) |
| 1914 | |
| 1915 | def split_map( |
| 1916 | self, |
| 1917 | left_layer: Optional[str] = "TERRAIN", |
| 1918 | right_layer: Optional[str] = "OpenTopoMap", |
| 1919 | left_args: Optional[dict] = {}, |
| 1920 | right_args: Optional[dict] = {}, |
| 1921 | left_array_args: Optional[dict] = {}, |
| 1922 | right_array_args: Optional[dict] = {}, |
| 1923 | zoom_control: Optional[bool] = True, |
| 1924 | fullscreen_control: Optional[bool] = True, |
| 1925 | layer_control: Optional[bool] = True, |
| 1926 | add_close_button: Optional[bool] = False, |
| 1927 | left_label: Optional[str] = None, |
| 1928 | right_label: Optional[str] = None, |
| 1929 | left_position: Optional[str] = "bottomleft", |
| 1930 | right_position: Optional[str] = "bottomright", |
| 1931 | widget_layout: Optional[dict] = None, |
| 1932 | draggable: Optional[bool] = True, |
| 1933 | ) -> None: |
| 1934 | """Adds split map. |
| 1935 | |
| 1936 | Args: |
| 1937 | left_layer (str, optional): The left tile layer. Can be a local file path, HTTP URL, or a basemap name. Defaults to 'TERRAIN'. |
| 1938 | right_layer (str, optional): The right tile layer. Can be a local file path, HTTP URL, or a basemap name. Defaults to 'OpenTopoMap'. |
| 1939 | left_args (dict, optional): The arguments for the left tile layer. Defaults to {}. |
| 1940 | right_args (dict, optional): The arguments for the right tile layer. Defaults to {}. |
| 1941 | left_array_args (dict, optional): The arguments for array_to_image for the left layer. Defaults to {}. |
| 1942 | right_array_args (dict, optional): The arguments for array_to_image for the right layer. Defaults to {}. |
| 1943 | zoom_control (bool, optional): Whether to add zoom control. Defaults to True. |
| 1944 | fullscreen_control (bool, optional): Whether to add fullscreen control. Defaults to True. |
| 1945 | layer_control (bool, optional): Whether to add layer control. Defaults to True. |
| 1946 | add_close_button (bool, optional): Whether to add a close button. Defaults to False. |
| 1947 | left_label (str, optional): The label for the left layer. Defaults to None. |
| 1948 | right_label (str, optional): The label for the right layer. Defaults to None. |
| 1949 | left_position (str, optional): The position for the left label. Defaults to "bottomleft". |
| 1950 | right_position (str, optional): The position for the right label. Defaults to "bottomright". |
| 1951 | widget_layout (dict, optional): The layout for the widget. Defaults to None. |
| 1952 | draggable (bool, optional): Whether the split map is draggable. Defaults to True. |
| 1953 | """ |
| 1954 | import geopandas as gpd |
| 1955 | |
| 1956 | if os.environ.get("USE_MKDOCS") is not None: |
| 1957 | return |
| 1958 | |
| 1959 | if "max_zoom" not in left_args: |
| 1960 | left_args["max_zoom"] = 30 |
| 1961 | if "max_native_zoom" not in left_args: |
| 1962 | left_args["max_native_zoom"] = 30 |
| 1963 | |
| 1964 | if "max_zoom" not in right_args: |
| 1965 | right_args["max_zoom"] = 30 |
| 1966 | if "max_native_zoom" not in right_args: |
| 1967 | right_args["max_native_zoom"] = 30 |
| 1968 | |
| 1969 | if "layer_name" not in left_args: |
| 1970 | left_args["layer_name"] = "Left Layer" |
| 1971 | |
| 1972 | if "layer_name" not in right_args: |