Stay organized with collections
Save and categorize content based on your preferences.
Centers the map view on a given object.
Returns this ui.Map.
Usage
Returns
Map.centerObject(object, zoom, onComplete)
ui.Map
Argument
Type
Details
this: ui.map
ui.Map
The ui.Map instance.
object
Element|Geometry
An object to center on - a geometry, image or feature.
zoom
Number, optional
The zoom level, from 0 to 24. If unspecified, computed based on the object's bounding box.
onComplete
Function, optional
A callback which is triggered after the recentering completes successfully. Passing this parameter causes the
`centerObject` operation to run asynchronously.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["`centerObject` centers the map view on a provided object (geometry, image, or feature)."],["You can optionally specify the zoom level and an `onComplete` callback function."],["Large or complex objects as input can negatively impact performance."],["Use the smallest necessary object to achieve the desired centering."]]],[]]