Added Documentation for IO and Zoom to Layer
" - [Adding Imagery layers](#Adding-imagery-layers)\n",
" - [Listing the layers added to the map](#Listing-the-layers-added-to-the-map)\n",
" - [Removing layers from the map](#Removing-layers-from-the-map)\n",
+ " - [Zooming to Layer](#Zooming-to-Layer)\n",
" - [Drawing graphics on the map](#Drawing-graphics-on-the-map)\n",
" - [Clearing the drawn graphics](#Clearing-the-drawn-graphics)\n",
" - [Saving the map as a web map](#Saving-the-map-as-a-web-map)\n",
"To remove all layers, call the `remove_layers()` method with any parameters."
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Zooming to Layer\n",
+ "To zoom to one or more layers, call the `zoom_to_layer()` method and pass a layer or list of layers that you want to snap your map to. The supplied item can be a single or a list of Items, layers, DataFrame, FeatureSet, FeatureCollection.\n",
+ "\n",
+ "The code below shows how to zoom to a single layer or multiple items."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Zoom to a single layer\n",
+ "m.zoom_to_layer(world_countries_layer)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Zoom to multiple items\n",
+ "m.zoom_to_layer([world_timezones_item, world_countries_layer.query().sdf])"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.6.6"
+ "version": "3.6.8"
}
},
"nbformat": 4,
