The ZoomToCustomCommand allows you to zoom to any specified geometry or collection of geometries. It accepts CustomZoomCommandParameters, which extends ZoomCommandParameters.
CommandVerb¶
zcu
Parameters
Name | Type | Description | Inherited |
---|
MapServiceName | string | Which map service is being utilized. This value corresponds to the alias given to the map service in the virtual application configuration. | no |
LayerId | string | Contains the id of the layer containing the items of interest. Refer to the map service for valid layer ids. | no |
ColumnId | string | The name of the column containing the values of interest. Refer to the layer for valid column ids. | no |
Highlight | bool | Specifies whether the resulting geometries should be highlighted on the map. | yes |
Buffer | double | The proportion by which to expand the envelope containing the returned geometries to create a buffer around them. Without providing a buffer the bounding envelope will be exactly large enough to contain the features. | yes |
Zoom | bool | Despite the command's name, it will no actually zoom unless this value is set to true. Otherwise, it will simply pan to align the center of the map with the center of the bounding envelope | no |
ValueDelimiter | string | The character used to separate multiple values in the Value parameter. | no |
Value | string | A delimited string specifying the values of interest in the given column, layer, and map service. | yes |
Code Sample
The following zooms to multiple counties, as specified in the Value property:
FDOT.Map.executeCommand("zcu", {
MapServiceName: "gev-dynamic",
LayerId: 178,
ColumnId: "NAME",
ValueDelimiter: ",",
Value: "LEON,ALACHUA,BAY,BAKER",
Highlight: true,
Buffer: 1.1,
Zoom: true,
DoClearFirst: true });
See Also