Method SetViewpointGeometryAsync
| Edit this page View SourceSetViewpointGeometryAsync(Geometry)
Zooms and pans the map view to the extent of the provided geometry.
Declaration
public virtual Task<bool> SetViewpointGeometryAsync(Geometry geometry)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geometry |
Returns
| Type | Description |
|---|---|
| Task<bool> |
|
Remarks
If the bounding geometry is a point, the map will only pan. If you want to center and zoom on a point, use SetViewpointCenterAsync(MapPoint, double).
SetViewpointGeometryAsync(Geometry, double)
Zooms and pans the map view to the extent of the provided geometry with additional padding.
Declaration
public virtual Task<bool> SetViewpointGeometryAsync(Geometry geometry, double padding)
Parameters
| Type | Name | Description |
|---|---|---|
| Geometry | geometry | |
| double | padding | The minimum amount of padding around the bounding geometry in pixels. |
Returns
| Type | Description |
|---|---|
| Task<bool> |
|
Remarks
If the bounding geometry is a point, the map will only pan. If you want to center and zoom on a point, use SetViewpointCenterAsync(MapPoint, double).