Map.centerObject

Centers the map view on a given object.

Returns the map.

UsageReturns
Map.centerObject(object, zoom)ui.Map
ArgumentTypeDetails
objectElement|Geometry

An object to center on - a geometry, image or feature.

zoomNumber, optional

The zoom level, from 1 to 24. If unspecified, computed based on the object's bounding box.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!