Platforms to show: All Mac Windows Linux Cross-Platform
Back to MKMapViewMBS class.
MKMapViewMBS.addAnnotation(annotation as MKAnnotationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
MKMapViewMBS.addAnnotations(annotations() as MKAnnotationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Some examples using this method:
MKMapViewMBS.addOverlay(overlay as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to add. This object must conform to the MKOverlayMBS interface.
The specified object is added to the group of overlay objects in the MKOverlayLevelAboveLabels level. Adding an overlay causes the map view to begin monitoring the area represented by that overlay. As soon as the bounding rectangle of an overlay intersects the visible portion of the map, the map view adds a corresponding overlay view to the map. The overlay view is provided by the mapViewViewForOverlay event.
To remove an overlay from a map, use the removeOverlay method.
See also:
Some examples using this method:
MKMapViewMBS.addOverlay(overlay as MKOverlayMBS, level as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to add. This object must conform to the MKOverlayMBS interface.
level: The map level at which to place the overlay. For a list of possible values for this parameter, see level constants.
Positioning an overlay at a specific level places that overlay’s visual representation in front of or behind other map content such as map labels and point-of-interest icons.
This method adds the specified overlay to the end of the list of overlay objects at the given level. Adding an overlay also causes the map view to begin monitoring the area they represent. As soon as the bounding rectangle of the overlay intersects the visible portion of the map, the map view calls your rendererForOverlay event to get the renderer object to use when drawing the overlay.
To remove an overlay from a map, use the removeOverlay: method.
See also:
MKMapViewMBS.addOverlays(overlays() as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlays: An array of objects, each of which must conform to the MKOverlayMBS interface.
The specified objects are added to the group of overlay objects in the MKOverlayLevelAboveLabels level. Adding an overlay causes the map view to begin monitoring the area represented by that overlay. As soon as the bounding rectangle of the overlay intersects the visible portion of the map, the map view tries to draw the overlay. As soon as the bounding rectangle of an overlay intersects the visible portion of the map, the map view adds a corresponding overlay view to the map. The overlay view is provided by the mapViewViewForOverlay method of the map view's delegate object.
To remove multiple overlays from a map, use the removeOverlays method.
See also:
MKMapViewMBS.addOverlays(overlays() as MKOverlayMBS, level as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlays: The array of overlay objects to add. Each object in the array must conform to the MKOverlayMBS interface.
level: The map level at which to place the overlays. For a list of possible values for this parameter, see MKOverlayLevel.
Positioning an overlay at a specific level places that overlay’s visual representation in front of or behind other map content such as map labels and point-of-interest icons.
This method adds the specified overlays to the end of the list of overlay objects at the given level. Adding the overlays also causes the map view to begin monitoring the area they represent. As soon as the bounding rectangle of an overlay intersects the visible portion of the map, the map view calls your rendererForOverlay event to get the renderer object to use when drawing that overlay.
To remove multiple overlays from a map, use the removeOverlays method.
See also:
MKMapViewMBS.annotations as MKAnnotationMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
If no annotations are associated with the map view, the value of this property is empty.
MKMapViewMBS.annotationsInMapRect(mapRect as MKMapRectMBS) as MKAnnotationMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
mapRect: The portion of the map that you want to search for annotations.
Returns the array of annotation objects located in mapRect.
This method offers a fast way to retrieve the annotation objects in a particular portion of the map. This method is much faster than doing a linear search of the objects in the annotations property yourself.
MKMapViewMBS.annotationViews as MKAnnotationViewMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 20.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
On success the handle property is not zero.
See also:
MKMapViewMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The handle is casted to a MKMapView and the plugin retains this handle.
See also:
MKMapViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
On success the handle property is not zero.
See also:
MKMapViewMBS.convertCoordinateToPointToView(coordinate as CLLocationCoordinate2DMBS, view as NSViewMBS) as NSPointMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
coordinate: The map coordinate for which you want to find the corresponding point.
view: The view in whose coordinate system you want to locate the specified map coordinate. If this parameter is nil, the returned point is specified in the window's coordinate system. If view is not nil, it must belong to the same window as the map view.
Returns the point (in the appropriate view or window coordinate system) corresponding to the specified latitude and longitude value.
MKMapViewMBS.convertPointToCoordinateFromView(point as NSPointMBS, view as NSViewMBS) as CLLocationCoordinate2DMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
point: The point you want to convert.
view: The view that serves as the reference coordinate system for the point parameter.
Returns the map coordinate at the specified point.
MKMapViewMBS.convertRectToRegionFromView(rect as NSRectMBS, view as NSViewMBS) as MKCoordinateRegionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
rect: The rectangle you want to convert.
view: The view that serves as the reference coordinate system for the rect parameter.
Returns the map region corresponding to the specified view rectangle.
MKMapViewMBS.convertRegionToRectToView(region as MKCoordinateRegionMBS, view as NSViewMBS) as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
region: The map region for which you want to find the corresponding view rectangle.
view: The view in whose coordinate system you want to locate the specified map region. If this parameter is nil, the returned rectangle is specified in the window's coordinate system. If view is not nil, it must belong to the same window as the map view.
Returns the rectangle corresponding to the specified map region.
MKMapViewMBS.dequeueReusableAnnotationViewWithIdentifier(identifier as string) as MKAnnotationViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
identifier: A string identifying the annotation view to be reused. This string is the same one you specify when initializing the annotation view using the Constructor method.
Returns an annotation view with the specified identifier, or nil if no such object exists in the reuse queue.
For performance reasons, you should generally reuse MKAnnotationView objects in your map views. As annotation views move offscreen, the map view moves them to an internally managed reuse queue. As new annotations move onscreen, and your code is prompted to provide a corresponding annotation view, you should always attempt to dequeue an existing view before creating a new one. Dequeueing saves time and memory during performance-critical operations such as scrolling.
Some examples using this method:
MKMapViewMBS.deselectAnnotation(annotation as MKAnnotationMBS, animated as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
annotation: The annotation object to deselect.
animated: If true, the callout view is animated offscreen.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
MKMapViewMBS.exchangeOverlay(index1 as Integer, index2 as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
index1: The index of an overlay in the MKOverlayLevelAboveLabels map level.
index2: The index of another overlay in the MKOverlayLevelAboveLabels map level.
If you need to exchange overlays in other map levels, use the exchangeOverlay method.
See also:
MKMapViewMBS.exchangeOverlay(Overlay1 as MKOverlayMBS, Overlay2 as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
If the overlays are in the same map level, they exchange positions within that level’s array of overlay objects. If they are in different map levels, the two objects also swap levels. Swapping the position of the overlays affects their visibility in the map view.
See also:
MKMapViewMBS.insertOverlayAboveOverlay(overlay as MKOverlayMBS, aboveOverlay as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to insert.
sibling: An existing object in the overlays array. This object must exist in the array and must not be nil.
This method inserts the overlay into the MKOverlayLevelAboveLabels level and positions it relative to the specified sibling. When displayed, this leads to the overlay's contents being displayed above that of its sibling. If sibling is not in the same map level, this method appends the overlay to the end of the list of overlays at the indicated level.
MKMapViewMBS.insertOverlayAtIndex(overlay as MKOverlayMBS, index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to insert.
index: The index at which to insert the overlay object. If this value is greater than the number of objects in the overlays property, this method appends the object to the end of the array.
This method inserts the overlay into the MKOverlayLevelAboveLabels level.
See also:
MKMapViewMBS.insertOverlayAtIndex(overlay as MKOverlayMBS, index as integer, level as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to insert.
index: The index at which to insert the overlay object. If this value is greater than the number of objects in the overlays property, this method appends the object to the end of the array.
level: The map level at which to place the overlay. For a list of possible values for this parameter, see level constants.
Inserting an overlay at a specific level places that overlay’s visual representation in front of or behind other map content such as map labels and point-of-interest icons.
See also:
MKMapViewMBS.insertOverlayBelowOverlay(overlay as MKOverlayMBS, belowOverlay as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to insert.
sibling: An existing object in the overlays array. This object must exist in the array and must not be nil.
This method inserts the overlay into the MKOverlayLevelAboveLabels level and positions it relative to the specified sibling. When displayed, this leads to the overlay's contents being displayed beneath that of its sibling. If sibling is not in the same map level, this method appends the overlay to the end of the list of overlays at the indicated level.
MKMapViewMBS.mapRectThatFits(mapRect as MKMapRectMBS) as MKMapRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
mapRect: The initial map rectangle whose width and height you want to adjust.
Returns a map rectangle that is still centered on the same point of the map but whose width and height are adjusted to fit in the map view’s frame.
You can use this method to normalize map rectangle values before displaying the corresponding area. This method returns a new map rectangle that both contains the specified rectangle and fits neatly inside the map view’s frame.
See also:
MKMapViewMBS.mapRectThatFits(mapRect as MKMapRectMBS, edgePaddingLeft as Double, edgePaddingTop as Double, edgePaddingRight as Double, edgePaddingBottom as Double) as MKMapRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
A map rectangle that is still centered on the same point of the map but whose width and height are adjusted to fit in the map view’s frame minus the inset values.
See also:
MKMapViewMBS.overlays as MKOverlayMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
This property contains the union of all overlays at the different levels of the map. The objects in this array must adopt the MKOverlayMBS interface. If no overlays are associated with the map view, the value of this property is an empty array.
The order of the objects in this array does not necessary reflect their visual order on the map.
Some examples using this method:
MKMapViewMBS.overlaysInLevel(level as Integer) as MKOverlayMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
level: The map level whose overlays you want. For a list of possible values for this parameter.
Returns an array of objects conforming to the MKOverlayMBS interfaces that display in the specified map level. If there are no overlays at the specified level, this method returns an empty array.
You can use this method to get all of the overlays assigned to a specific map level, which might be a subset of the complete set of overlay objects. For overlapping overlay objects, the order of objects in the array represents their visual order when displayed on the map, with objects in the beginning of the array located behind those at later indexes.
MKMapViewMBS.regionThatFits(region as MKCoordinateRegionMBS) as MKCoordinateRegionMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
region: The initial region whose span you want to adjust.
Returns a region that is still centered on the same point of the map but whose span values are adjusted to fit in the map view’s frame.
You can use this method to normalize the region values before displaying them in the map. This method returns a new region that both contains the specified region and fits neatly inside the map view’s frame.
MKMapViewMBS.removeAnnotation(annotation as MKAnnotationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
annotation: The annotation object to remove. This object must conform to the MKAnnotationMBS interface.
If the annotation is currently associated with an annotation view, and that view has a reuse identifier, this method removes the annotation view and queues it internally for later reuse. You can retrieve queued annotation views (and associate them with new annotations) using the dequeueReusableAnnotationViewWithIdentifier method.
Removing an annotation object disassociates it from the map view entirely, preventing it from being displayed on the map. Thus, you would typically call this method only when you want to hide or delete a given annotation.
MKMapViewMBS.removeAnnotations(annotations() as MKAnnotationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
annotations: The array of annotations to remove. Objects in the array must conform to the MKAnnotationMBS interface.
If any annotation object in the array has an associated annotation view, and if that view has a reuse identifier, this method removes the annotation view and queues it internally for later reuse. You can retrieve queued annotation views (and associate them with new annotations) using the dequeueReusableAnnotationViewWithIdentifier method.
Removing annotation objects disassociates them from the map view entirely, preventing them from being displayed on the map. Thus, you would typically call this method only when you want to hide or delete the specified annotations.
Some examples using this method:
MKMapViewMBS.removeOverlay(overlay as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object to remove.
This method removes the overlay regardless of the level that it is in. Removing an overlay also removes its corresponding renderer, if one is in use. If the specified overlay is not currently associated with the map view, this method does nothing.
Some examples using this method:
MKMapViewMBS.removeOverlays(overlays() as MKOverlayMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlays: An array of objects, each of which conforms to the MKOverlayMBS interface.
This method removes the specified overlays regardless of which level each one is in. Removing an overlay also removes its corresponding renderer, if one is in use. If a given overlay object is not associated with the map view, it is ignored.
MKMapViewMBS.rendererForOverlay(overlay as MKOverlayMBS) as MKOverlayRendererMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
overlay: The overlay object whose renderer you want.
Returns the renderer object in use for the specified overlay or nil if the overlay is not onscreen.
This method returns the renderer object that your control provided in its xrendererForOverlay event.
MKMapViewMBS.selectAnnotation(annotation as MKAnnotationMBS, animated as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
annotation: The annotation object to select.
animated: If true, the callout view is animated into position.
If the specified annotation is not onscreen, and therefore does not have an associated annotation view, this method has no effect.
MKMapViewMBS.selectedAnnotations as MKAnnotationMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Assigning a new array to this property selects only the first annotation in the array.
MKMapViewMBS.setCamera(camera as MKMapCameraMBS, Animated as boolean = true)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
camera: The camera object containing the viewing angle information. This parameter must not be nil.
animated: Specify true if you want the change in viewing angle to be animated or false if you want the map to reflect the changes without animations.
MKMapViewMBS.setCenterCoordinate(centerCoordinate as CLLocationCoordinate2DMBS, zoomLevel as double, animated as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Zoomlevel is in range 1 to 20.
Latitude and Longitude in coordinate: The new center coordinate for the map.
animated: Specify true if you want the map view to scroll to the new location or false if you want the map to display the new location immediately.
Changing the center coordinate centers the map on the new coordinate without changing the current zoom level. It also updates the value in the region property to reflect the new center coordinate and the new span values needed to maintain the current zoom level.
See also:
Some examples using this method:
MKMapViewMBS.setCenterCoordinate(coordinate as CLLocationCoordinate2DMBS, Animated as boolean = true)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Latitude and Longitude in coordinate: The new center coordinate for the map.
animated: Specify true if you want the map view to scroll to the new location or false if you want the map to display the new location immediately.
Changing the center coordinate centers the map on the new coordinate without changing the current zoom level. It also updates the value in the region property to reflect the new center coordinate and the new span values needed to maintain the current zoom level.
See also:
MKMapViewMBS.setRegion(c as CLLocationCoordinate2DMBS, animated as boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Same as SetRegion with MKCoordinateRegionMBS but reuses current coordinate span.
See also:
MKMapViewMBS.setRegion(region as MKCoordinateRegionMBS, animated as boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
region: The new region to display in the map view.
animated: Specify true if you want the map view to animate the transition to the new region or false if you want the map to center on the specified region immediately.
Changing just the center coordinate of the region can still cause the span values to change implicitly. The span values might change because that 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 setCenterCoordinate instead.
When setting a new region, the map may adjust the value in the region parameter so that it fits the visible area of the map precisely. This adjustment is normal and is done to ensure that the value in the region property always reflects the visible portion of the map. However, it does mean that if you get the value of that property right after calling this method, 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.)
See also:
MKMapViewMBS.setVisibleMapRect(coordinate as MKMapRectMBS, Animated as boolean = true)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
mapRect: The map rectangle to make visible in the map view.
animate: Specify true if you want the map view to animate the transition to the new map rectangle or false if you want the map to center on the specified rectangle immediately.
See also:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.