new CoordinateRegion(center, span)
A rectangular geographic region that centers around a latitude and longitude coordinate.
Declaration
constructor(center?: Coordinate, span?: CoordinateSpan);Parameters
- center:
A Coordinate that’s the center point of the region.
- span:
A Coordinatespan that represents the amount of map to display. The span also defines the current zoom level that the map object uses.
Discussion
Create a coordinate region by passing a center coordinate and span to the constructor.
const coordinate = new mapkit.Coordinate(37.415, -122.048333); // latitude, longitude
const span = new mapkit.CoordinateSpan(.016, .016); // latitude delta, longitude delta
const region = new mapkit.CoordinateRegion(coordinate, span);