Represents the location displayed on the map. When multiple properties are defined, the targetGeometry
is applied first, then the scale
, then the rotation
.
Referenced by: bookmark, initialState
Properties
Property | Details |
---|---|
rotation | The clockwise rotation of due north in relation to the top of the view in degrees. Default is 0 . |
scale | The scale of the viewpoint. If scale is not defined, it will be automatically calculated such that it is just small enough to fit the entire targetGeometry within the view. |
targetGeometry | [Required] The target extent framed by the viewpoint. |
Central Park in Manhattan Example
{
"targetGeometry": {
"spatialReference": {
"latestWkid": 3857,
"wkid": 102100
},
"xmin": -8237304.65218491,
"ymin": 4977090.890664136,
"xmax": -8230616.412209966,
"ymax": 4983588.038068367
}
}
Central Park in Manhattan at Street scale Example
{
"scale": 9027,
"targetGeometry": {
"spatialReference": {
"latestWkid": 3857,
"wkid": 102100
},
"xmin": -8237304.65218491,
"ymin": 4977090.890664136,
"xmax": -8230616.412209966,
"ymax": 4983588.038068367
}
}
Central Park in Manhattan rotated by 45 degrees Example
{
"rotation": 45,
"targetGeometry": {
"spatialReference": {
"latestWkid": 3857,
"wkid": 102100
},
"xmin": -8237304.65218491,
"ymin": 4977090.890664136,
"xmax": -8230616.412209966,
"ymax": 4983588.038068367
}
}