Welcome Guest, you are in: Login

FDOT Wiki

RSS RSS

GisFramework



Search the wiki
»

ZoomToCustomCommand

RSS
Modified on Monday, 14 October 2013 08:23 AM by 156.75.200.109 Categorized as Commands
The ZoomToCustomCommand allows you to zoom to any specified geometry or collection of geometries. It accepts CustomZoomCommandParameters, which extends ZoomCommandParameters.


CommandVerb

zcu

Parameters

NameTypeDescriptionInherited
MapServiceNamestringWhich map service is being utilized. This value corresponds to the alias given to the map service in the virtual application configuration.no
LayerIdstringContains the id of the layer containing the items of interest. Refer to the map service for valid layer ids.no
ColumnIdstringThe name of the column containing the values of interest. Refer to the layer for valid column ids.no
HighlightboolSpecifies whether the resulting geometries should be highlighted on the map.yes
BufferdoubleThe 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
ZoomboolDespite 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 envelopeno
ValueDelimiterstringThe character used to separate multiple values in the Value parameter.no
ValuestringA 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

Any Questions or Comments? Email
Some of the icons created by FamFamFam.