Platforms to show: All Mac Windows Linux Cross-Platform

Back to MKMapViewMBS class.

MKMapViewMBS.annotationVisibleRect as NSRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The visible rectangle where annotation views are currently being displayed.

(Read only property)

MKMapViewMBS.camera as MKMapCameraMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The camera used for determining the appearance of the map.

A camera object defines a point above the map’s surface from which to view the map. Applying a camera to a map can have the effect of giving the map a 3D-like appearance. You can use a camera to rotate the map so that it is oriented to match the user’s heading or to apply a pitch angle to tilt the plane of the map. (You can check the map’s pitchEnabled property to determine whether the map can be pitched.)

Assigning a new camera to this property updates the map immediately and without animating the change. If you want to animate changes in camera position, use the setCamera method instead.

You must not set this property to nil. To restore the map to a flat appearance, apply a camera with a pitch angle of 0, which yields a camera looking straight down onto the map surface.
(Read and Write property)

MKMapViewMBS.centerCoordinate as CLLocationCoordinate2DMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The map coordinate at the center of the map view.
Example
dim mapview as MKMapViewMBS // your map view
dim centerCoordinate as CLLocationCoordinate2DMBS = mapview.centerCoordinate

// show center
MsgBox str(centerCoordinate.latitude)+" "+str(centerCoordinate.longitude)

Changing the value in this property centers the map on the new coordinate without changing the current zoom level. It also updates the values in the region property to reflect the new center coordinate and the new span values needed to maintain the current zoom level.

Changing the value of this property updates the map view immediately. If you want to animate the change, use the setCenterCoordinate method instead.
(Read and Write property)

MKMapViewMBS.mapType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The type of data displayed by the map view.
Example
dim mapview as MKMapViewMBS // your map view
mapView.mapType = mapView.MKMapTypeHybrid

Changing the value in this property may cause the receiver to begin loading new map content. For example, changing from MKMapTypeStandard to MKMapTypeSatellite might cause it to begin loading the satellite imagery needed for the map. If new data is needed, however, it is loaded asynchronously and appropriate messages are sent to the receiver's delegate indicating the status of the operation.
(Read and Write property)

MKMapViewMBS.PitchEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether the map camera’s pitch information is used.

When this property is set to true and a valid camera is associated with the map, the camera’s pitch angle is used to tilt the plane of the map. When this property is set to NO, the camera’s pitch angle is ignored and the map is always displayed as if the user is looking straight down onto it.
In an app, always check the value of this property to determine whether a map can support 3D.
(Read and Write property)

MKMapViewMBS.region as MKCoordinateRegionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The area currently displayed by the map view.

The region encompasses both the latitude and longitude point on which the map is centered and the span of coordinates to display. The span values provide an implicit zoom value for the map. The larger the displayed area, the lower the amount of zoom. Similarly, the smaller the displayed area, the greater the amount of zoom.

Changing only the center coordinate of the region can still cause the span to change implicitly. The span might change because the distances represented by a span change at different latitudes and longitudes and the map view may need to adjust the span to account for the new location. If you want to change the center coordinate without changing the zoom level, use the centerCoordinate instead.

Changing the value of this property updates the map view immediately. When setting this property, the map may adjust the new region value so that it fits the visible area of the map precisely. This is normal and is done to ensure that the value in this property always reflects the visible portion of the map. However, it does mean that if you get the value of this property right after setting it, the returned value may not match the value you set. (You can use the regionThatFits method to determine the region that will actually be set by the map.)

If you want to animate the change in region, use the setRegion method instead.
(Read and Write property)

MKMapViewMBS.RotateEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether the map camera’s heading information is used.

When this property is set to true and a valid camera is associated with the map, the camera’s heading angle is used to rotate the plane of the map around its center point. When this property is set to false, the camera’s heading angle is ignored and the map is always oriented so that true north is situated at the top of the map view.
(Read and Write property)

MKMapViewMBS.scrollEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether the user may scroll around the map.

This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the map location programmatically by changing the value in the region property.

The default value of this property is true.
(Read and Write property)

MKMapViewMBS.showsBuildings as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean indicating whether the map displays extruded building information.

When this property is set to YES and the camera has a pitch angle greater than zero, the map extrudes buildings so that they extend above the map plane, creating a 3D effect. The mapType property must be set to MapTypeStandard for extruded buildings to be displayed. The default value of this property is true.
(Read and Write property)

MKMapViewMBS.ShowsCompass as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean indicating whether the map displays a compass control.

Use this property to show or hide a control that lets users change the heading orientation of the map.
(Read and Write property)

Some examples using this property:

MKMapViewMBS.showsPointsOfInterest as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean indicating whether the map displays point-of-interest information.

When this property is set to true, the map displays icons and labels for restaurants, schools, and other relevant points of interest. The mapType property must be set to MapTypeStandard or MapTypeHybrid for points of interest to be displayed. The default value of this property is true.
(Read and Write property)

MKMapViewMBS.showsScale as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean indicating whether the map shows scale information.

The default value of this property is false.
(Read and Write property)

Some examples using this property:

MKMapViewMBS.showsTraffic as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether the map displays traffic information.

The mapType property must be set to MapTypeStandard or MapTypeHybrid for traffic information to be shown. The default value of this property is false.
(Read and Write property)

MKMapViewMBS.showsUserLocation as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether the map should try to display the user's location.

This property does not indicate whether the user's position is actually visible on the map, only whether the map view should try to display it. Setting this property to true causes the map view to use the Core Location framework to find the current location and try to display it on the map. As long as this property is true, the map view continues to track the user's location and update it periodically. The default value of this property is false.

Showing the user's location does not guarantee that the location is visible on the map. The user might have scrolled the map to a different point, causing the current location to be offscreen. To determine whether the user's current location is currently displayed on the map, use the userLocationVisible property.
(Read and Write property)

Some examples using this property:

MKMapViewMBS.showsZoomControls as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean indicating whether the map displays zoom controls.

In macOS, use this property to show or hide the controls that let users change the zoom level of the map.
(Read and Write property)

Some examples using this property:

MKMapViewMBS.userLocation as MKUserLocationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The annotation object representing the user's current location.

(Read only property)

MKMapViewMBS.userLocationVisible as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value indicating whether the device's current location is visible in the map view.

This property tells you whether the icon used to represent the user's current location is visible in the map view. When determining whether the current location is visible, this property factors in the horizontal accuracy of the location data. Specifically, if the rectangle represented by the user's current location plus or minus minus the horizontal accuracy of that location intersects the map's visible rectangle, this property contains the value true. If that location rectangle does not intersect the map's visible rectangle, this property contains the value false.

If the user's location cannot be determined, this property contains the value false.
(Read only property)

MKMapViewMBS.visibleMapRect as MKMapRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The area currently displayed by the map view.

This property represents the same basic information as the region property but specified as a map rectangle instead of a region.
Changing the value of this property updates the map view immediately. If you want to animate the change, use the setVisibleMapRect method instead.
(Read and Write property)

Some examples using this property:

MKMapViewMBS.zoomEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 14.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether the user may use pinch gestures to zoom in and out of the map.

This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the zoom level programmatically by changing the value in the region property.

The default value of this property is true.
(Read and Write property)

MKMapViewMBS.zoomLevel as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MapKit MBS MacFrameworks Plugin 19.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Queries current zoom level.
Example
dim m as MKMapViewMBS // your map view

// zoom in one level
m.zoomLevel = m.zoomLevel + 1

A value between 1 and 20.
(Read and Write property)

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...