Platforms to show: All Mac Windows Linux Cross-Platform
Back to MKMapViewMBS class.
MKMapViewMBS.setVisibleMapRect(mapRect as MKMapRectMBS, edgePaddingLeft as Double, edgePaddingTop as Double, edgePaddingRight as Double, edgePaddingBottom as Double, 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 |
MapRect: The map rectangle to make visible in the map view.
edgePaddingLeft, edgePaddingTop, edgePaddingRight and edgePaddingBottom: The amount of additional space (measured in screen points) to make visible around the specified rectangle.
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:
MKMapViewMBS.setZoomLevel(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.
MKMapViewMBS.showAddress(address as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 14.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Uses CLGeocoderMBS geocodeAddressString method to asynchronously find the place and show it on the map.
Some examples using this method:
MKMapViewMBS.ShowAllAnnotations(withOverlays as boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 22.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The plugin loops over the annotations to calculate a bounding rectangle for all annotations and zoom the map to make them all visible with some border space around.
Added withOverlays parameter in v22.4 to include overlays in the calculation of the rectangle.
MKMapViewMBS.showAnnotations(annotations() 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 |
annotations: The annotations that you want to be visible in the map.
animated: true if you want the map region change to be animated, or NO if you want the map to display the new region immediately without animations.
Calling this method updates the value in the region property and potentially other properties to reflect the new map region.
MKMapViewMBS.viewForAnnotation(annotation as MKAnnotationMBS) as MKAnnotationViewMBS
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 whose view you want.
Returns the annotation view or nil if the view has not yet been created. This method may also return nil if the annotation is not in the visible map region and therefore does not have an associated annotation view.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.