Class

mapkit.MapRect

A rectangular area on a two-dimensional map projection.

Declaration

interface mapkit.MapRect

Overview

If you project the curved surface of the globe onto a flat surface, what you get is a two-dimensional version of a map where longitude lines appear to be parallel. Such maps are often used to show the entire surface of the globe all at once. A mapkit.MapRect data structure represents a rectangular area as seen on this two-dimensional map.

Topics

Creating a Map Rectangle

mapkit.MapRect

Initializes a mapkit.MapRect object.

Defining a Map Rectangle

origin

The origin point of a rectangle.

size

The width and height of a rectangle, starting from the origin point.

Getting Rectangle Metrics

maxX

The maximum x-axis value of a rectangle.

maxY

The maximum y-axis value of a rectangle.

midX

The mid-point along the x-axis of a rectangle.

midY

The mid-point along the y-axis of a rectangle.

minX

The minimum x-axis value of a rectangle.

minY

The minimum y-axis value of a rectangle.

Copying, Comparing, Scaling, and Converting

copy

Returns a copy of a map rectangle.

equals

Indicates whether two map rectangles are equal.

toCoordinateRegion

Returns the region that corresponds to a map rectangle.

See Also

Map Units

mapkit.MapPoint

A location on a map when the Earth's surface is projected onto a 2D surface.

mapkit.MapSize

A pair of values in map units that define the width and height of a projected coordinate span.

mapkit.CameraZoomRange

A minimum and maximum camera distance as meters from the center of the map.